ci: pull the indicator count, and render the banner in the same job - #59
Merged
Conversation
The count is decided in wickra-lib/wickra and appears three times in profile/README.md: twice in prose and once as the ?v= cache-buster on the banner image. It arrived by push -- that repository's sync-about.yml cloned this one with a personal access token and committed the number. The token carried write access to four repositories, administration rights on wickra and admin:org, and existed for no other reason. Pulling removes the need for it, and a schedule is the only trigger that can work: the number changes in the other repository, so a push here is not the event that makes this profile wrong. The banner is regenerated here rather than left to banner.yml. That workflow fires on a push to profile/README.md, and a push made with GITHUB_TOKEN does not start workflows -- only the personal access token did. Keeping the split would have frozen the banner the moment the token went away, quietly, with everything green. banner.yml still serves a hand-edited README; it is no longer load-bearing. The cache-buster is bumped for the same reason the banner is rendered: GitHub proxies the raw image through Camo, so a new banner at an unchanged URL keeps serving the old picture. Nothing bumped it before -- sync-about.yml patched the prose count only. The parse refuses a count under 100, which is what a moved re-export block or a truncated fetch produces, so a bad read leaves the file alone instead of replacing a correct number with a wrong one.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The indicator count is decided in
wickra-lib/wickraand appears three times inprofile/README.md— twice in prose and once as the?v=cache-buster on the banner image.Today it arrives by push: that repository's
sync-about.ymlclones this one with a personal access token and commits the number. That token carries write access to four repositories,Administration: writeonwickraandadmin:org. It is the only repository-level secret in the organisation and exists for no other reason.A schedule is also the only trigger that can work here — the number changes in the other repository, so a push here is not the event that makes this profile wrong. Hourly at
:43, clear ofrefresh-badgesat:17andrefresh-socialat:37.The banner is rendered in this job, not left to banner.yml
This is the part that would have broken silently.
banner.ymlfires on a push toprofile/README.md. A push made withGITHUB_TOKENdoes not start workflows — only the personal access token did. Keeping the split would have frozen the banner the moment the token went away: the README would carry the new number, the image would keep the old one, and every check would stay green.So this job regenerates it directly.
banner.ymlstill covers a hand-edited README and manual dispatch; it is simply no longer load-bearing.The cache-buster is bumped for the same reason
GitHub proxies the raw image through Camo. A regenerated banner at an unchanged URL keeps serving the old picture.
Nothing bumped it before —
sync-about.ymlpatches the prose count only, so the?v=has been moving only when someone edited it by hand.Guard
The parse refuses a count under 100 — what a moved re-export block or a truncated fetch produces. Without it, a partial response silently replaces a correct number with a wrong one.
Verification
The derivation matches
sync-about.yml's. Checked three ways at 514: local source,grep -c '^mod ', and a live fetch throughraw.githubusercontent.com. Bothsedexpressions were dry-run against the currentprofile/README.mdand hit exactly the four occurrences (line 2 cache-buster, lines 31, 73, 84 prose).Same workflow already merged and verified live in
wickra-docs(#104) andwebpage(#72): each run reads 514 and reportsnothing to commit.