#404 Use same Bodhi's regex to detect bugs in changelog
Closed: Fixed 3 years ago by onosek. Opened 3 years ago by mattia.

Currently fedpkg update detects bug numbers to fill in the update with a too much relaxed regex r'#([0-9]+)'. This causes bugs from other bug trackers to be erroneously detected as Bugzilla bugs and added to Bodhi's update.

In Bodhi 5.3 we will use a more specific regex from Rawhide builds changelog:
r'(?:fix(?:es)?|close(?:s)?|resolve(?:s)?(?:\:)?)\s(?:fedora|epel|rh(?:bz)?)#(\d{5,})

It would be nice to align the two tools to use the same format.


Thanks @mattia I recently implemented it here: https://pagure.io/fedpkg/pull-request/410
But I did some minor changes. My expression looks:

r'(?:fix(?:es)?|close(?:s)?|resolve(?:s)?)(?::|:\s+|\s+)(?:fedora|epel|rh(?:bz)?)#(\d{5,})

This makes expression little more tolerant to spaces. But I think it also fixes mistake with one ending bracket that should end after "resolve" part.

Metadata Update from @onosek:
- Issue set to the milestone: 1.39

3 years ago

Login to comment on this ticket.

Metadata
Related Pull Requests
  • #410 Merged 3 years ago