Skip to content

Commit 9577ff9

Browse files
committed
Remove input for author in post release tasks and add todos in body of pr
1 parent 317894e commit 9577ff9

2 files changed

Lines changed: 38 additions & 26 deletions

File tree

.github/workflows/README-post-release.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,6 @@ Post Release - 2025.1.2 [spring-cloud-config,spring-cloud-build] - Dry Run
7070
| `projects` | Comma-separated project names, `-commercial` suffix included where applicable. Empty processes every project in the properties file. See [The projects filter](#the-projects-filter). | No | string |
7171
| `skip_close_milestones` | Leave the release milestones open. Nothing else changes — the releases are still published, the next round of milestones is still opened, and the merge back still runs. Use it when issues are still being moved between milestones, then re-run with it unchecked (closing a milestone is idempotent, and everything else is a no-op the second time). | No | boolean (default: `false`) |
7272
| `skip_website_pr` | Skip the [spring-website-content PR](#the-website-pr). It is already skipped for a commercial run, a hotfix, and a run with `projects` set. | No | boolean (default: `false`) |
73-
| `blog_author` | `author` in the blog post front matter. | No | string (default: `ryanjbaxter`) |
7473
| `dry_run` | When checked, nothing is created, committed or pushed — but the summary shows what would happen. | No | boolean (default: `true`) |
7574
| `token` | Token with write access to all target repos. Falls back to `GH_ACTIONS_REPO_TOKEN`. | No | string |
7675

@@ -262,13 +261,17 @@ Everything derivable is filled in:
262261
| `This release is based on Spring Boot X` | the `spring-boot` entry in the properties file |
263262
| The module table, and one `###` heading per project | the projects whose version changed in this release, see below |
264263
| `publishedAt` | the date the workflow runs |
265-
| `author` | the `blog_author` input |
266264

267-
Two parts **cannot** be derived and are left as placeholders for the team to write in the PR, with a checklist in the PR body:
265+
The rest **cannot** be derived and is left as a placeholder for the team to write in the PR. **The PR body lists every one of them as a checklist**, in the order they appear in the file:
268266

267+
- **`author`** — written as `TODO`. It is whoever writes the post up, which is not necessarily whoever ran the release.
268+
- **`publishedAt`** — the date the workflow ran, so it needs changing if the post goes out on another day.
269269
- **The train codename.** The title reads `Spring Cloud 2025.0.4 (aka CODENAME) Has Been Released` — "Northfields", "Oakwood" and the rest are recorded nowhere this workflow reads. The file name deliberately leaves the codename out rather than carrying the placeholder into a published URL, so renaming the file to `...-aka-<codename>-has-been-released.md` is on the checklist too.
270+
- **The Spring Boot line**, which only ever says which version the train is based on. The recent posts say more than that.
270271
- **Notable changes.** Each project that shipped gets a `### Spring Cloud X` heading with `TODO` under it. Delete the ones with nothing worth calling out.
271272

273+
When a post for this version already exists the checklist is left out entirely, and the PR body says the PR carries nothing but the documentation versions.
274+
272275
A post for this version anywhere under `blog/` means one already exists — a re-run after the first PR merged, or an announcement written by hand — and it is never overwritten. The documentation updates still go ahead.
273276

274277
### Which projects are listed

.github/workflows/post-release.yml

Lines changed: 32 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -71,11 +71,6 @@ on:
7171
required: false
7272
type: boolean
7373
default: false
74-
blog_author:
75-
description: 'author for the blog post front matter'
76-
required: false
77-
type: string
78-
default: 'ryanjbaxter'
7974
dry_run:
8075
description: 'Dry run, if checked nothing is created, committed or pushed, but you can see what would happen'
8176
required: false
@@ -1453,7 +1448,6 @@ jobs:
14531448
RELEASE_REPO: ${{ needs.setup.outputs.release-repo }}
14541449
ENTRIES: ${{ needs.setup.outputs.entries }}
14551450
NEXT_VERSIONS: ${{ needs.next-snapshot-config.outputs.versions }}
1456-
BLOG_AUTHOR: ${{ inputs.blog_author }}
14571451
DRY_RUN: ${{ inputs.dry_run }}
14581452
RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
14591453
run: |
@@ -1465,7 +1459,6 @@ jobs:
14651459
const token = process.env.GH_TOKEN;
14661460
const releaseVersion = process.env.RELEASE_VERSION;
14671461
const releaseRepo = process.env.RELEASE_REPO;
1468-
const author = (process.env.BLOG_AUTHOR || '').trim() || 'ryanjbaxter';
14691462
const dryRun = process.env.DRY_RUN === 'true';
14701463
const runUrl = process.env.RUN_URL || '';
14711464
const entries = JSON.parse(process.env.ENTRIES);
@@ -1475,8 +1468,10 @@ jobs:
14751468
const BASE = 'main';
14761469
const CONFIG_BRANCH = 'jenkins-releaser-config';
14771470
// Release train codenames (Northfields, Oakwood) live nowhere this workflow reads,
1478-
// so the title carries a placeholder rather than a guess.
1471+
// so the title carries a placeholder rather than a guess. Same for the author: it is
1472+
// whoever writes the post up, not whoever happened to run the release.
14791473
const CODENAME = 'CODENAME';
1474+
const AUTHOR = 'TODO';
14801475
14811476
const gh = args => execFileSync('gh', args,
14821477
{ encoding: 'utf8', stdio: ['pipe', 'pipe', 'pipe'] });
@@ -1628,7 +1623,7 @@ jobs:
16281623
B.push(`title: "Spring Cloud ${releaseVersion} (aka ${CODENAME}) Has Been Released"`);
16291624
B.push('category: Releases');
16301625
B.push(`publishedAt: ${today}`);
1631-
B.push(`author: ${author}`);
1626+
B.push(`author: ${AUTHOR}`);
16321627
B.push('---');
16331628
B.push('');
16341629
B.push('On behalf of the community, I am pleased to announce that the General ' +
@@ -1832,17 +1827,31 @@ jobs:
18321827
P.push(`Generated by the [post release workflow](${runUrl}) for Spring Cloud ` +
18331828
`${releaseVersion}.`);
18341829
P.push('');
1835-
P.push('### Before merging');
1836-
P.push('');
1837-
P.push(`- [ ] Replace \`${CODENAME}\` in the blog post title with the release train ` +
1838-
`codename, and rename the file to \`spring-cloud-${dashed}-aka-<codename>-has-been-` +
1839-
'released.md\`');
1840-
P.push('- [ ] Write the `TODO` sections under **Notable Changes** — there is one ' +
1841-
'heading per project whose version changed in this release, and any with nothing ' +
1842-
'worth calling out should just be deleted');
1843-
P.push('- [ ] Check the Spring Boot compatibility line');
1844-
P.push(`- [ ] Check \`publishedAt: ${today}\``);
1845-
P.push('');
1830+
// Only when this run wrote the post. When one already existed the PR is nothing but
1831+
// documentation.json bumps, and a checklist about a file it does not touch would
1832+
// send whoever reviews it looking for placeholders that are not there.
1833+
if (result.blogStatus === 'created') {
1834+
P.push('### Before merging');
1835+
P.push('');
1836+
P.push('Everything the workflow could not derive is left as a placeholder in ' +
1837+
`\`${blogFile}\`, in the order it appears:`);
1838+
P.push('');
1839+
P.push('- [ ] `author: TODO` in the front matter — whoever is writing the post up');
1840+
P.push(`- [ ] \`publishedAt: ${today}\` — the date this ran, so change it if the ` +
1841+
'post goes out on another day');
1842+
P.push(`- [ ] \`${CODENAME}\` in the title — the release train codename, and rename ` +
1843+
`the file to \`spring-cloud-${dashed}-aka-<codename>-has-been-released.md\``);
1844+
P.push('- [ ] The Spring Boot line — generated from the `spring-boot` entry in the ' +
1845+
'properties file, so it only says which version the train is based on');
1846+
P.push('- [ ] A `TODO` under every project heading in **Notable Changes** — there is ' +
1847+
'one heading per project whose version changed in this release, and any with ' +
1848+
'nothing worth calling out should just be deleted');
1849+
P.push('');
1850+
} else if (result.blogStatus === 'already-exists') {
1851+
P.push(`A post for ${releaseVersion} already exists (\`${result.blogFile}\`), so ` +
1852+
'this PR only carries the documentation versions.');
1853+
P.push('');
1854+
}
18461855
if (docRows.length) {
18471856
P.push('### documentation.json');
18481857
P.push('');
@@ -2104,9 +2113,9 @@ jobs:
21042113
d.status === 'ambiguous' || d.status === 'unparseable' || d.status === 'no-entry');
21052114
for (const d of odd) L.push(`- ⚠️ \`${d.file}\` — ${d.status}`);
21062115
L.push('');
2107-
if (web.status === 'created') {
2108-
L.push('The post is a template: the codename is still `CODENAME` in the title and ' +
2109-
'every project section still says `TODO`. The PR body has the checklist.');
2116+
if (web.blogStatus === 'created') {
2117+
L.push('The post is a template: the author and every project section still say ' +
2118+
'`TODO`, and the title still says `CODENAME`. The PR body has the checklist.');
21102119
L.push('');
21112120
}
21122121
}

0 commit comments

Comments
 (0)