Skip to content

Commit

Permalink
add milestone update msg
Browse files Browse the repository at this point in the history
  • Loading branch information
smuzaffar committed Nov 6, 2023
1 parent ff18a4e commit 12c0068
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions new-release-cycle.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,12 @@ def update_milestone(repo, source, srcMilestone, desMilestone, dryRun=False):
if pr.milestone.number == desMilestone.number:
print(" Milestone already updated for PR:", pr.number)
elif pr.milestone.number == srcMilestone.number:
msg = "Milestone for this pull request has been moved to %s." % desMilestone.title
msg += "Please open a backport if it should also go in to %s." % srcMilestone.title
print(msg)
if not dryRun:
issue = repo.get_issue(pr.number)
issue.create_comment(msg)
issue.edit(milestone=desMilestone)
print(" Updated milestone for PR:", pr.number)
else:
Expand Down

0 comments on commit 12c0068

Please sign in to comment.