Repository navigation
fix: make station checks usable as required status checks - #291
Merged
Merged
Conversation
- Rename jobs to station-csv-check / station-json-check so the two workflows no longer share the `check` context name. - Run on every PR and skip the validation step when the dev file is unchanged, so a required check never stays pending. - Use github.token for pull_request checkouts; fork PRs cannot read PAT_TOKEN and PR runs only need read access. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
背景
PR #288 的
Station CSV Check失敗了(1A7461Cid 重複),卻還是被合併進main。原因是 branch protection 和 rulesetmain都沒有設定任何必要的 status check。這個 PR 先調整 workflow,讓這兩個檢查可以設成必要檢查。
變更
check→station-csv-check/station-json-check。原本兩個 workflow 的 job 都叫check,設成必要檢查時沒辦法分辨是哪一個。pull_request的paths過濾:必要檢查只要沒有回報,PR 就會一直卡在 "Expected — Waiting for status"。現在每個 PR 都會觸發 workflow,沒有修改station-dev.*的 PR 會跳過驗證、直接通過。push到main的觸發條件不變。github.token:從 fork 開的 PR 拿不到PAT_TOKEN,checkout 會失敗;PR 的檢查本來也只需要讀取權限。push 到main時仍然使用PAT_TOKEN來提交station.csv/station.json。合併後
到 ruleset
main→ Require status checks to pass 加入station-csv-check和station-json-check。🤖 Generated with Claude Code