The regular expression used to extract tracker URLs from the PR body
was too generous. When there are two URLs on the same line and the
second is a tracker URl, the regex picked up both of them. For example,
the following string matched the regex:
"https://github.com/ceph/ceph/pull/26538, https://tracker.ceph.com/issues/41452"
This commit fixes the issue.
Signed-off-by: Nathan Cutler <ncutler@suse.com>
#
for bt in self.backport_trackers:
# does the Backport Tracker description link back to the GitHub PR?
- p = re.compile('http.*://github.com/ceph/ceph/pull/\\d+')
+ p = re.compile('http.?://github.com/ceph/ceph/pull/\\d+')
bt.tracker_description = bt.redmine_issue.description
bt.github_url_from_tracker = None
try:
def extract_backport_trackers_from_github_pr_desc(self):
global redmine_endpoint
- p = re.compile('http.*://tracker.ceph.com/issues/\\d+')
+ p = re.compile('http.?://tracker.ceph.com/issues/\\d+')
matching_strings = p.findall(self.github_pr_desc)
if not matching_strings:
print_outer_divider()