Skip to content

Commit

Permalink
Only mention merging the mergeback PR in the checklist when relevant
Browse files Browse the repository at this point in the history
  • Loading branch information
Henry Mercer committed Mar 24, 2022
1 parent bd4757c commit 1668e0a
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions .github/update-release-branch.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def branch_exists_on_remote(branch_name):
return run_git('ls-remote', '--heads', ORIGIN, branch_name).strip() != ''

# Opens a PR from the given branch to the release branch
def open_pr(repo, all_commits, short_main_sha, new_branch_name, source_branch, target_branch, conductor):
def open_pr(repo, all_commits, short_main_sha, new_branch_name, source_branch, target_branch, conductor, include_mergeback_in_changelog):
# Sort the commits into the pull requests that introduced them,
# and any commits that don't have a pull request
pull_requests = []
Expand Down Expand Up @@ -79,7 +79,8 @@ def open_pr(repo, all_commits, short_main_sha, new_branch_name, source_branch, t
body.append(' - [ ] The CHANGELOG includes all relevant, user-facing changes since the last release.')
body.append(' - [ ] There are no unexpected commits being merged into the ' + target_branch + ' branch.')
body.append(' - [ ] The docs team is aware of any documentation changes that need to be released.')
body.append(' - [ ] The mergeback PR is merged back into ' + source_branch + ' after this PR is merged.')
if include_mergeback_in_changelog:
body.append(' - [ ] The mergeback PR is merged back into ' + source_branch + ' after this PR is merged.')

title = 'Merge ' + source_branch + ' into ' + target_branch

Expand Down Expand Up @@ -271,7 +272,8 @@ def main():
new_branch_name,
source_branch=args.source_branch,
target_branch=args.target_branch,
conductor=args.conductor
conductor=args.conductor,
include_mergeback_in_changelog=not args.perform_v2_to_v1_backport
)

if __name__ == '__main__':
Expand Down

0 comments on commit 1668e0a

Please sign in to comment.