#71 Better Issue Matching
Merged by ralph. Opened by sidpremkumar.
sidpremkumar/sync-to-jira better-matching  into  develop

Download 71.patch

Sometimes when a Repo is merged, issue links no longer correspond to the same title (i.e. if '[fake_user/fake_project] fake_issue' gets merged into a RedHat git repo, it becomes '[red-hat/fake_project] fake_issue' but the issue link remains the same. This causes an issue when we are trying to match upstream/downstream issues.

The proposed fix is to first check for a direct match or an ID match as before. But if that does not return anything check to see if the upstream titles match directly (i.e. even if [red-hat/fake_project] don't match, check if fake_issue is in the downstream title. If it is, spit out a warning and assume they are supposed to be matched.

Other fixes in this PR:
* Check comments of an issue if it has been marked as a duplicate of another issue (skip if this is the case)
* Assert issue ID should be a string

Do humans type this Marking as duplicate string into jira? Can you rely on it being in this specific format?

Do humans type this Marking as duplicate string into jira? Can you rely on it being in this specific format?

That string is made internally within sync2jira. See downstream.py:_close_as_duplicate

Ah, good.

Pull-Request has been merged by ralph

Metadata