Skip to content

test: exercise the station copy bot (do not merge) - #295

Closed
whes1015 wants to merge 2 commits into
ci/station-copies-in-prfrom
test/station-sync-dryrun
Closed

whes1015 wants to merge 2 commits into
ci/station-copies-in-prfrom
test/station-sync-dryrun

Conversation

@whes1015

Copy link
Copy Markdown
Member

#294 的實測用草稿 PR,不會合併。只改了 station-dev.csv 一行,看 bot 會不會把 station.csv 改進這個 commit 並推回分支。驗完就關閉並刪除分支。

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 [skip ci]" commit straight to main, 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.
@whes1015
whes1015 force-pushed the test/station-sync-dryrun branch from db69272 to d54147c Compare October 11, 2026 16:20
@whes1015
whes1015 force-pushed the ci/station-copies-in-pr branch from 0521dac to 35d5e39 Compare October 11, 2026 16:22
@whes1015

Copy link
Copy Markdown
Member Author

#294 的實測完成,關閉並刪除分支。

@whes1015 whes1015 closed this Oct 11, 2026
@whes1015
whes1015 deleted the test/station-sync-dryrun branch October 11, 2026 16:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant