Repository navigation
ci: run Lint & Type Check and CI on merge_group - #172
Merged
Merged
Conversation
The ruleset on main has a merge queue and requires `Lint & Type Check`, but neither workflow triggered on `merge_group`, so queued PRs waited for a check that never reported. Add the trigger; existing triggers and job names are unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QSeKYnW1Xf6HDSWz1eGAqv
Contributor
Author
|
repo:mobile#1 · os-justin · session_01QSeKYnW1Xf6HDSWz1eGAqv Seat verdict: ACCEPT — Head-sha: 维护者速读
席位意见: 两行改动,CI 全绿,dev 逐条核对了表达式,没有只在 PR 场景下才能用的写法。合入后,席位就能用队列落地非受管 PR。建议合并。 席位核对
|
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.
Fixes #171
Clause-②: no
Metadata-protocol: none
维护者速读
lint-typecheck.yml与ci.yml的on:各加一行merge_group:,其余触发器、job 名一字未动;EAS 三个 workflow 未碰。main开了合并队列且必需检查是Lint & Type Check,但两个 workflow 不在merge_group上运行,队列里的 PR 等不到检查,60 分钟后被移出,什么都合不进去。if:仅有always(),与事件无关。回滚即还原本 PR。.github/workflows/lint-typecheck.yml(必需检查所在,看新增的merge_group:行);其次.github/workflows/ci.yml。gh-readonly-queue/main/...引用上应出现Lint & Type Check与Code Quality两个 check-run 且变绿并合入。.github/workflows/**,由你合并)。What changes
.github/workflows/lint-typecheck.yml:merge_group:added toon:afterworkflow_dispatch:. Job name staysLint & Type Check, so the required context is unchanged..github/workflows/ci.yml:merge_group:added toon:afterpush:. Job name staysCode Quality.merge_group:is bare (notypes/branchesfilter):checks_requestedis the only activity type, and the queue only exists onmain.eas-build.yml,eas-update.yml,eas-submit.yml.merge_group expression audit
Every
if:,github.*context,github.event_name,github.head_refandpull_requestoccurrence in both files (grep overif:|event_name|head_ref|pull_request|github.):merge_grouplint-typecheck.ymlpull_request:(trigger key, not an expression)merge_group:keyci.ymlpull_request:(trigger key, not an expression)ci.ymlif: always()onUpload coveragetrue; event-independentif:exists in either file, so neither job can be skipped by the event; nogithub.head_reforgithub.event.pull_requestread exists, so nothing reads an empty or absent field. No fix was needed.actions/checkout@v4with noref:checks outgithub.sha, which onmerge_groupis the queue's merge commit ongh-readonly-queue/main/...: the tree the queue wants tested.pnpm/action-setupandactions/setup-nodewithcache: pnpmkey on the lockfile hash, not the ref; a cache miss is only slower.actions/upload-artifact@v4, namecoverage-report): artifacts are scoped to the workflow run, and each merge-group run is its own run, so the fixed name cannot collide; the step needs only the default token andcontents: read. It works undermerge_group. Were it ever to fail it would not gate: the required check isLint & Type Check, a different workflow.Tests
All run at head
1808854in a worktree offorigin/main92a0a26:npx tsc --noEmit: exit 0.npx eslint . --ext .ts,.tsx: exit 0.npx jest --ci --coverage --maxWorkers=2: exit 0,Test Suites: 33 passed, 33 total,Tests: 519 passed, 519 total.yamlpackage (node -e "require('yaml')"exit 0,yaml@2.9.0):lint-typecheck.ymltriggersmerge_group,pull_request,push,workflow_dispatch, jobLint & Type Check;ci.ymltriggersmerge_group,pull_request,push, jobCode Quality. Cross-checked withpython3 yaml.safe_load, exit 0 on both.These suites do not exercise the workflow files; they confirm the tree is green. The real proof is the acceptance step on the card: the first queued PR after this lands.
Acceptance notes
"private": trueand the workflows ship nothing; the previous CI-only change onmain(3fa8b72, EAS workflow guards) landed without one, and this repo has no changeset check in.github/workflows/.Co-Authored-Bytrailer naming a model, written from the session's attribution reminder; the fleet rule is a model-free pair. History was not rewritten (no force-push); the seat decides.Verification
After merge through the queue: the next queued PR's
gh-readonly-queue/main/...ref showsLint & Type CheckandCode Qualitycheck-runs, and the PR lands.Generated by Claude Code