Skip to content

Commit 038242a

Browse files
authored
Merge pull request #1254 from github/henrymercer/improve-release-pr-description
Improve the descriptions of PRs created by the release process
2 parents aaca819 + 2e9fbe3 commit 038242a

File tree

2 files changed

+34
-15
lines changed

2 files changed

+34
-15
lines changed

.github/update-release-branch.py

Lines changed: 22 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -67,40 +67,48 @@ def open_pr(
6767
body.append('Merging ' + source_branch_short_sha + ' into ' + target_branch)
6868

6969
body.append('')
70-
body.append('Conductor for this PR is @' + conductor)
70+
body.append(f'Conductor for this PR is @{conductor}.')
7171

7272
# List all PRs merged
7373
if len(pull_requests) > 0:
7474
body.append('')
7575
body.append('Contains the following pull requests:')
7676
for pr in pull_requests:
7777
merger = get_merger_of_pr(repo, pr)
78-
body.append('- #' + str(pr.number) + ' - ' + pr.title +' (@' + merger + ')')
78+
body.append(f'- #{pr.number} (@{merger})')
7979

8080
# List all commits not part of a PR
8181
if len(commits_without_pull_requests) > 0:
8282
body.append('')
8383
body.append('Contains the following commits not from a pull request:')
8484
for commit in commits_without_pull_requests:
85-
author_description = ' (@' + commit.author.login + ')' if commit.author is not None else ''
86-
body.append('- ' + commit.sha + ' - ' + get_truncated_commit_message(commit) + author_description)
85+
author_description = f' (@{commit.author.login})' if commit.author is not None else ''
86+
body.append(f'- {commit.sha} - {get_truncated_commit_message(commit)}{author_description}')
8787

8888
body.append('')
89-
body.append('Please review the following:')
89+
body.append('Please do the following:')
9090
if len(conflicted_files) > 0:
91-
body.append(' - [ ] The `package.json` file contains the correct version.')
92-
body.append(' - [ ] You have added commits to this branch that resolve the merge conflicts ' +
91+
body.append(' - [ ] Ensure `package.json` file contains the correct version.')
92+
body.append(' - [ ] Add commits to this branch to resolve the merge conflicts ' +
9393
'in the following files:')
9494
body.extend([f' - [ ] `{file}`' for file in conflicted_files])
95-
body.append(' - [ ] Another maintainer has reviewed the additional commits you added to this ' +
95+
body.append(' - [ ] Ensure another maintainer has reviewed the additional commits you added to this ' +
9696
'branch to resolve the merge conflicts.')
97-
body.append(' - [ ] The CHANGELOG displays the correct version and date.')
98-
body.append(' - [ ] The CHANGELOG includes all relevant, user-facing changes since the last release.')
99-
body.append(' - [ ] There are no unexpected commits being merged into the ' + target_branch + ' branch.')
100-
body.append(' - [ ] The docs team is aware of any documentation changes that need to be released.')
97+
body.append(' - [ ] Ensure the CHANGELOG displays the correct version and date.')
98+
body.append(' - [ ] Ensure the CHANGELOG includes all relevant, user-facing changes since the last release.')
99+
body.append(' - [ ] Check that there are not any unexpected commits being merged into the ' + target_branch + ' branch.')
100+
body.append(' - [ ] Ensure the docs team is aware of any documentation changes that need to be released.')
101+
102+
if not is_v2_release:
103+
body.append(' - [ ] Remove and re-add the "Update dependencies" label to the PR to trigger just this workflow.')
104+
body.append(' - [ ] Wait for the "Update dependencies" workflow to push a commit updating the dependencies.')
105+
body.append(' - [ ] Mark the PR as ready for review to trigger the full set of PR checks.')
106+
107+
body.append(' - [ ] Approve and merge this PR.')
108+
101109
if is_v2_release:
102-
body.append(' - [ ] The mergeback PR is merged back into ' + source_branch + ' after this PR is merged.')
103-
body.append(' - [ ] The v1 release PR is merged after this PR is merged.')
110+
body.append(' - [ ] Merge the mergeback PR that will automatically be created once this PR is merged.')
111+
body.append(' - [ ] Merge the v1 release PR that will automatically be created once this PR is merged.')
104112

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

.github/workflows/post-release-mergeback.yml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,17 @@ jobs:
114114
run: |
115115
set -exu
116116
pr_title="Mergeback ${VERSION} ${HEAD_BRANCH} into ${BASE_BRANCH}"
117-
pr_body="Updates version and changelog."
117+
pr_body=$(cat << EOF
118+
This PR bumps the version number and updates the changelog after the ${VERSION} release.
119+
120+
Please do the following:
121+
122+
- [ ] Remove and re-add the "Update dependencies" label to the PR to trigger just this workflow.
123+
- [ ] Wait for the "Update dependencies" workflow to push a commit updating the dependencies.
124+
- [ ] Mark the PR as ready for review to trigger the full set of PR checks.
125+
- [ ] Approve and merge the PR.
126+
EOF
127+
)
118128
119129
# Update the version number ready for the next release
120130
npm version patch --no-git-tag-version
@@ -134,4 +144,5 @@ jobs:
134144
--title "${pr_title}" \
135145
--label "Update dependencies" \
136146
--body "${pr_body}" \
147+
--assignee "${GITHUB_ACTOR}" \
137148
--draft

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy