Repository navigation
Let GitHub title promoted pull requests, and link digests and ranges - #136
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JCF8gyb8jNRmHmWqQmVhRJ
The promotion pull request's change list wrote each squash-merged title's pull request as a bare cross-repository reference and its commit as a bare short hash. GitHub renders a bare reference as the title of the pull request it names, which repeated the title each line already starts with, and does not link a bare hash from another repository. Write both as explicit Markdown links instead: the reference keeps its owner/repo#N text, and the hash links to the commit. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JCF8gyb8jNRmHmWqQmVhRJ Co-Authored-By: Petra Jaros <peeja@peeja.com>
Each squash-merged commit in a service's change list is now just a bare reference to its pull request, which GitHub renders as that pull request's title, instead of the commit's title followed by a reference GitHub expanded to the same title again. Commits that came from no pull request keep their own title. Each digest links to the bump pull request that first pinned it on dev, which names its source commit and publish run, and each commit range links to its compare view. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JCF8gyb8jNRmHmWqQmVhRJ Co-Authored-By: Petra Jaros <peeja@peeja.com>
The packages API maps a digest to its version's page; the bot token can read it. When the lookup fails or finds nothing, the digest links to the dev bump pull request as before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JCF8gyb8jNRmHmWqQmVhRJ Co-Authored-By: Petra Jaros <peeja@peeja.com>
ab7102d to
4f21357
Compare
72cd8f8 to
9e01d99
Compare
|
Claude reviewer says… (1st round, Nothing blocking; two should-fix findings in Verified: shellcheck 0.11.0 passes on
Generated by Claude Code |
…ay titles Review round 1 on this PR: - A failed ghcr.io lookup was silent: gh's error went to /dev/null and the digest quietly linked its bump pull request. It now leaves a ::warning::. - Each run paged through a service's whole version list once per digest, and the list only grows. It is now fetched once per moving service, in the main loop, since digest_link runs in a subshell that would lose it. - A commit title that isn't a squash-merge's was copied raw, so a "#12" in it pointed at this repository and an "@name" pinged someone. It now goes in a code span, so it is never read as a reference, a mention, a closing keyword or formatting. - A CRLF title kept its "\r", so a squash commit's "(#N)" went unseen. - The change list said nothing when it was empty or when the compare API cut it short, and a failed call could leave gh's error JSON in the body. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-Authored-By: Petra Jaros <petra@fil.org> Claude-Session: https://claude.ai/code/session_01JCF8gyb8jNRmHmWqQmVhRJ
|
Claude author says… The fixes are in
Checks:
Round 1 had should-fix findings, so a round 2 follows. Generated by Claude Code |
|
Claude reviewer says… (2nd round,
Verified:
Not run: the ghcr.io lookup (403 here), and how GitHub renders the body.
Generated by Claude Code |
Review round 2 on this PR: the compare API returns no commits when dev's pin is behind staging's, as after a reverted dev bump, and the list then said both pins were built from the same commit while the promotion would roll staging back. The line now follows the compare's status: identical, behind (merging rolls staging back) or diverged (merging drops staging's own commits). A version with no page is skipped rather than linked to "null", and a commit with an empty title reads "(no title)". Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-Authored-By: Petra Jaros <petra@fil.org> Claude-Session: https://claude.ai/code/session_01JCF8gyb8jNRmHmWqQmVhRJ
|
Claude author says… The fixes are in
Checks:
Round 2 had a should-fix, so a round 3 follows. Generated by Claude Code |
Review round 3 on this PR: the behind and diverged notes read "1 commits", and the cut-short note followed the diverged one, where it read as more of staging's dropped commits rather than more of the list. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-Authored-By: Petra Jaros <petra@fil.org> Claude-Session: https://claude.ai/code/session_01JCF8gyb8jNRmHmWqQmVhRJ
|
Claude reviewer says… (3rd round, The round-2 finding is fixed. Nothing blocking or should-fix; two wording nits. Verified:
Not run: the ghcr.io lookup (403 here), and GitHub's rendering.
Generated by Claude Code |
|
Claude author says… Both nits are fixed in
Checks:
This round found only nits, so there won't be another. Generated by Claude Code |
Brings in 878acad (Bump piri on dev to sha256:f4e3889, #149). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-Authored-By: Petra Jaros <petra@fil.org> Claude-Session: https://claude.ai/code/session_01JCF8gyb8jNRmHmWqQmVhRJ
Brings in fa4384f (Bump ingot on dev to sha256:3158cdb, #150). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-Authored-By: Petra Jaros <petra@fil.org> Claude-Session: https://claude.ai/code/session_01JCF8gyb8jNRmHmWqQmVhRJ
Brings in 3638753 (Bump ingot on dev to sha256:e525b38, #151). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-Authored-By: Petra Jaros <petra@fil.org> Claude-Session: https://claude.ai/code/session_01JCF8gyb8jNRmHmWqQmVhRJ
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-Authored-By: Petra Jaros <petra@fil.org> Claude-Session: https://claude.ai/code/session_01JCF8gyb8jNRmHmWqQmVhRJ
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-Authored-By: Petra Jaros <petra@fil.org> Claude-Session: https://claude.ai/code/session_01JCF8gyb8jNRmHmWqQmVhRJ
* Let GitHub title promoted PRs, and link digests A promotion pull request listed each squash-merged commit as its title followed by a cross-repository reference, which GitHub expanded into the same title again as a link, so every line said everything twice. Digests, commit hashes and the commit range were plain text. Port fil-forge/infra-nodes#136, which fixed the same list there: - A squash-merged commit is a bare reference to its pull request, which GitHub renders as that pull request's title. Any other commit keeps its own title, in a code span, so nothing in it is read as a reference, a mention or a closing keyword. - Each hash links to its commit, and each range to its compare view. - Each digest links to its version page on ghcr.io, or to the dev bump that carried it when the packages API has no page for it. - The list says when the source's pin is behind the target's or has diverged from it, and when the compare API cut it short. Unlike infra-nodes, this script pages through the compare API, and every page repeats the totals and the status. The pages are read as one array, with jq, so each note is written once. The ghcr.io package is named after the service's repository rather than its pin key, and the version list sits in a plain variable rather than an associative array, so the script still runs under macOS's bash 3.2. Assisted-by: Claude:claude-opus-5-5 Signed-off-by: Miroslav Bajtoš <oss@bajtos.net> * docs: name every jq variable in the SC2016 comment The comment justifying the shellcheck exception listed four of the jq program's variables and missed $compare, $commits and $behind. Assisted-by: Claude:claude-opus-5-5 Signed-off-by: Miroslav Bajtoš <oss@bajtos.net> --------- Signed-off-by: Miroslav Bajtoš <oss@bajtos.net>
Written by Claude.
Addresses bajtos's comment on #117: #117 (comment)
Problem
In the promotion pull request (#129), each line of a service's change list showed its title twice, and its commit hash was plain text. The script wrote each line as the commit's title, then a bare cross-repository reference (
fil-forge/piri#147), then a bare short hash (a6e6377):issue-link js-issue-linkclass, which marks them for that. The line already started with the same title.Change
In
scripts/ci/promote-staging.sh:changes()): a squash-merged commit, whose title ends in(#123), is now written as only the bare reference to the service's pull request, and GitHub supplies the title. A commit that came from no pull request keeps its own title, in a code span, so nothing in it is read as a reference, a mention or a closing keyword. Each commit hash links to the commit. The list says so when it's empty or when the compare API cut it short.digest_link()): each links to its version's page on ghcr.io, looked up through the packages API, which is read once per service. If the lookup fails, the run logs a warning. If it fails or finds nothing, the digest links to the bump pull request that first pinned it on dev, which names the source commit and the publish run. If no bump onmaincarried it either, it stays plain text.Demo
The piri section of the message, trimmed to three of its 13 lines. Before is #129's body now. After is
--dry-runoutput onmainat8041b66, from the Actions run in #137.Before
sha256:c16a9f9→sha256:b6f7371What fil-forge/piri brings over staging's pin,
7ba7d94..d20dcec:upgrade-checkfinds an upgrade unsafe (Say whyupgrade-checkfinds an upgrade unsafe piri#151) (2773386)After
sha256:c16a9f9→sha256:b6f7371What fil-forge/piri brings over staging's pin,
7ba7d94..d20dcec:upgrade-checkfinds an upgrade unsafe piri#151 (2773386)Testing
make check-shellpasses.--dry-runin Actions, with thefil-forge-bottoken and the GitHub CLI thatpromote-staging.ymluses, in the scratch pull request Scratch: can fil-forge-bot read ghcr.io package versions? #137 (job). Both services' sections came out as the After above, with every digest linked to its ghcr.io version page.fil-forge-botinstallation lacks the Packages permission: minting a token that asks forpermission-packages: readfails with "The permissions requested are not granted to this installation." Its default token andGITHUB_TOKENstill read both packages' versions. Speculation: that is because the packages are public. If either goes private, the lookup fails and the digest falls back to the bump pull request link.changes()'s jq on made-up commits: a title from no pull request came out in a code span with its backticks swapped for quotes, a CRLF squash title still became a bare reference, an empty compare said so, and a cut-short one counted what it left out.--dry-runhere onmainatbb08740after the round-1 fixes: both services' change lists came out as bare references, and with the packages API out of reach each service logged one warning and fell back to its bump pull requests.mainafter this merges, this merge included, rebuilds it.✴️
🤖 Generated with Claude Code
https://claude.ai/code/session_01JCF8gyb8jNRmHmWqQmVhRJ
Generated by Claude Code