Bug 9817 - add a robot that tracks when patches are sent to mailing list for review and merged into master branches
Summary: add a robot that tracks when patches are sent to mailing list for review and ...
Status: RESOLVED DUPLICATE of bug 7327
Alias: None
Product: Bugzilla
Classification: Infrastructure
Component: bugzilla (show other bugs)
Version: unspecified
Hardware: x86 Multiple
: Medium enhancement
Target Milestone: Future
Assignee: Michael Halstead
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2016-06-23 13:16 UTC by Alexander Kanavin
Modified: 2020-11-05 08:10 UTC (History)
5 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Kanavin 2016-06-23 13:16:27 UTC
Currently when a patch associated with a bug is posted for review or merged into repository, the bug has to be manually updated with a link to it. Humans are bad at this kind of activity, but it can be entirely automated, because there is already an established practice to include the bug number into the patch.

So the robot would add comments to the bug with a link to either the maillist archive or the git web UI.
Comment 1 Michael Halstead 2016-06-29 19:46:52 UTC
It appears https://github.com/gera/gitzilla will support what we want here. 

Which repos do we need to watch for bug numbers? Is poky enough? 

Does this regex grab all the bug numbers we need?

git log | python -c "import sys,re; bug_id = re.compile(r'.*\[YOCTO[ #]*(\d{3,5})[^]]*\]'); print([bug_id.match(line).group(1) for line in sys.stdin if bug_id.match(line)])"
Comment 2 Alexander Kanavin 2016-06-30 13:43:30 UTC
We also need something that would track the mailing lists.

The regex could be simplified:
 - no need to match exactly between 3 and 5 digits (any amount will do, no?)
 - no need to do matching beyond the digits

Ross?
Comment 3 Ross Burton 2016-06-30 13:46:00 UTC
Indeed Gitzilla looks like it should work.

My little tool uses the regex r"(YOCTO|YP) ?#?(?P<bug>[0-9]+)" with re.IGNORECASE.

There's example of bugs using YP#1234 or Yocto#1234 or YOCTO 1234.  The square brackets are not used consistently enough so I dropped them from the match.
Comment 4 Ross Burton 2020-11-05 08:10:57 UTC
Duplicate

*** This bug has been marked as a duplicate of bug 7327 ***