Skip to content

fix: make station checks usable as required status checks - #291

Merged
whes1015 merged 1 commit into
mainfrom
fix/ci-required-check
Oct 11, 2026
Merged

whes1015 merged 1 commit into
mainfrom
fix/ci-required-check

Conversation

@whes1015

Copy link
Copy Markdown
Member

背景

PR #288 的 Station CSV Check 失敗了(1A7461C id 重複),卻還是被合併進 main。原因是 branch protection 和 ruleset main 都沒有設定任何必要的 status check。

這個 PR 先調整 workflow,讓這兩個檢查可以設成必要檢查。

變更

  • job 改名: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 的觸發條件不變。
  • PR 的 checkout 改用 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

- 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>
@whes1015
whes1015 merged commit 70367ce into main Oct 11, 2026
5 checks passed
@whes1015
whes1015 deleted the fix/ci-required-check branch October 11, 2026 14:44
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