public inbox for overseers@sourceware.org
 help / color / mirror / Atom feed
* The email-to-bugzilla bug-number-matching regular expression
@ 2021-09-17 16:38 Joseph Myers
  2021-09-17 17:09 ` H.J. Lu
  0 siblings, 1 reply; 2+ messages in thread
From: Joseph Myers @ 2021-09-17 16:38 UTC (permalink / raw)
  To: libc-alpha, overseers

Since Apr 2020, /sourceware/infra/bin/email-to-bugzilla has matched bug 
numbers with:

while ($log_txt =~ m/\s(?:bug|PR|BZ)\s+\#?\s*(?:[a-z0-9+-]+\/)?(?:\/)?(\d+)(.*)$/si) {

That is, whitespace is required before "bug", "PR" or "BZ".  That's fine 
for GCC commit conventions (bug numbers mentioned in a ChangeLog entry in 
the commit message, "PR c/123456" after a TAB).  It doesn't work very well 
for glibc commit messages (no ChangeLog entries used, bug numbers often 
mentioned only in the form "(bug 12345)" or "[BZ #12345]" in the commit 
summary line.

Could we use \b instead of \s at the start of the regular expression, so 
we still avoid matching "Apr 1", but do match "(bug" or "[BZ"?

-- 
Joseph S. Myers
joseph@codesourcery.com

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: The email-to-bugzilla bug-number-matching regular expression
  2021-09-17 16:38 The email-to-bugzilla bug-number-matching regular expression Joseph Myers
@ 2021-09-17 17:09 ` H.J. Lu
  0 siblings, 0 replies; 2+ messages in thread
From: H.J. Lu @ 2021-09-17 17:09 UTC (permalink / raw)
  To: Joseph Myers; +Cc: GNU C Library, Overseers mailing list

On Fri, Sep 17, 2021 at 9:38 AM Joseph Myers <joseph@codesourcery.com> wrote:
>
> Since Apr 2020, /sourceware/infra/bin/email-to-bugzilla has matched bug
> numbers with:
>
> while ($log_txt =~ m/\s(?:bug|PR|BZ)\s+\#?\s*(?:[a-z0-9+-]+\/)?(?:\/)?(\d+)(.*)$/si) {
>
> That is, whitespace is required before "bug", "PR" or "BZ".  That's fine
> for GCC commit conventions (bug numbers mentioned in a ChangeLog entry in
> the commit message, "PR c/123456" after a TAB).  It doesn't work very well
> for glibc commit messages (no ChangeLog entries used, bug numbers often
> mentioned only in the form "(bug 12345)" or "[BZ #12345]" in the commit
> summary line.
>
> Could we use \b instead of \s at the start of the regular expression, so
> we still avoid matching "Apr 1", but do match "(bug" or "[BZ"?
>

Another problem is that the hook doesn't check the BZ # in commit subject.


-- 
H.J.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-09-17 17:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-17 16:38 The email-to-bugzilla bug-number-matching regular expression Joseph Myers
2021-09-17 17:09 ` H.J. Lu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).