Repository navigation
Commit 35d5e39
committed
ci: keep the station copies in the commit that changes them
station.csv and station.json are generated from their -dev files. The
bot did that after a merge, pushing a "chore: update station.csv from
station-dev.csv" commit straight to main with CI skipped, so every
station fix landed as two commits: 95 of the last 300 on main were the
bot's.
Do it inside the pull request instead. When a same-repository pull
request opens or moves, the bot reruns both generators in each of its
commits, amends any copy that changed into that commit (author kept,
committer github-actions[bot]) and pushes the branch back with a lease
on the head it saw. The push goes out with PAT_TOKEN, because commits
pushed with GITHUB_TOKEN start no workflow run and the required checks
would never report. A rebase merge then lands one commit per change.
What a pull request could not carry is still put right on main: a fork
gets no secrets, so its copies are generated after the merge as before,
and a hand edit to a copy is overwritten with the generated result.
That replaces protect-station-*.yml, which judged commits by author
name and email (any GitHub noreply address passed) and force-pushed a
revert to main.
All four workflows become one, so the two jobs cannot race to push to
main. station-csv-check and station-json-check keep their names, which
the ruleset requires, and pass a pull request that does not touch the
-dev file, as before.1 parent 58fdc17 commit 35d5e39
5 files changed
Lines changed: 241 additions & 328 deletions
File tree
- .github/workflows
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
0 commit comments