-
Notifications
You must be signed in to change notification settings - Fork 26
[ART-6709] update pr title with relate issue bug #795
Conversation
Build #1
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
Think it'd be good to have this functionality under test.
We're posting things to a publicly visible place, and we're not looking at this actively. So would be good to assert its behavior in tests.
Build #2
|
Build #3
|
Build #4
|
Build #5
|
Build #6
|
Build #7
|
@@ -1237,8 +1260,6 @@ def check_if_upstream_image_exists(upstream_image): | |||
# In one execution to date, get_pulls did not find the open PR and the code repeatedly hit this | |||
# branch -- attempting to recreate the PR. Everything seems right, but the github api is not | |||
# returning it. So catch the error and try to move on. | |||
pr_url = f'UnknownPR-{fork_branch_head}' | |||
pr_links[dgk] = pr_url |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
since we will use pr_links to do jira connection in the following step, such exception info is not useful in pr_links list.
Build #8
|
Build #9
|
Build #10
|
Build #11
|
doozerlib/cli/images_streams.py
Outdated
@@ -1189,7 +1212,7 @@ def check_if_upstream_image_exists(upstream_image): | |||
yellow_print(f'Unable to add labels to {existing_pr.html_url}: {str(pr_e)}') | |||
|
|||
pr_url = existing_pr.html_url | |||
pr_links[dgk] = pr_url | |||
pr_links[dgk] = existing_pr |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pr_url is no longer used.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also pr_links should be renamed since it no longer means "PR links".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
update pr_links to pr_dgk_map
doozerlib/cli/images_streams.py
Outdated
pr.edit(title=f"{issue}: {pr.title}") | ||
|
||
|
||
def reconcile_jira_issues(runtime, pr_links: Dict[str, PullRequest.PullRequest], dry_run: bool): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Parameter name pr_links
is not appropriate.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
update the parameter pr_links to pr_map
doozerlib/cli/images_streams.py
Outdated
""" | ||
if issue in pr.title: # the issue already in pr title | ||
return | ||
elif "OCPBUGS" in pr.title: # another issue is in pr title, add comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's be more concise. Instead of testing OCPBUGS in PR title, check if matches = re.findall(r'OCPBUGS-[0-9]+', pr.title)
is empty, where you did in line 625.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated
Build #12
|
Build #13
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generally LGTM
Build #14
|
ref https://issues.redhat.com/browse/ART-6709
update pr title with relate issue bug