CI: "Validate changelog diffs" job fails on every fork-sourced pull request
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 84/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- git, github-actions
- 领域
- ci-cd
调研方向
阅读 .github/workflows/lint-build-test.yml 和 .github/actions/check-merge-queue-changelogs,然后检查 Validate changelog diffs 步骤及其 pull request 事件上下文。验证来源于 fork 的 pull request 可以完成 changelog 差异验证,同时 merge_group 的行为和每个 package 的 changelog 检查仍然通过。
由索引模型根据 Issue 内容生成。
描述
Bug
"Lint, build, and test / Validate changelog diffs" fails on every fork-sourced pull request, independent of the PR's content.
Root cause
The validate-changelog-diffs job (.github/workflows/lint-build-test.yml) runs the composite action .github/actions/check-merge-queue-changelogs, whose "Check changelog changes" step computes:
TARGET_REF=$(git merge-base "origin/$BASE_REF" "origin/$PR_BRANCH")
For a PR whose head lives on a fork, origin/$PR_BRANCH does not exist in the job's checkout (fork head branches are fetched as refs/pull/N/merge, not as remote branches under origin), so the job dies before validating anything:
fatal: Not a valid object name origin/feature/use-memory-see-this-sp0
##[error]Process completed with exit code 128.
The job has no skip condition beyond the event type, so this affects every fork-sourced PR.
Evidence
- PR #10535 (fork branch
feature/use-memory-see-this-sp0) — job run: https://github.com/MetaMask/core/actions/runs/36560718378/job/109380743283- The job failed on every commit the PR has ever had — including its very first commit
ca6a523772— i.e., the failure is independent of the PR's changes and occurs before any changelog diff is computed (the per-packageValidate changelog (24.x, @metamask/assets-controller)job passes for the same commits).
- The job failed on every commit the PR has ever had — including its very first commit
- PR #10229 (fork branch
feat/assets-transient-loading-state) — the same job showsFAILUREon its head commits (db682a870f,47b7803dfd).
Impact
- Every fork-sourced PR shows a red "Validate changelog diffs" check (and the "All jobs pass" aggregate) for a reason unrelated to the PR, making genuinely failing checks harder to spot and fork PRs appear blocked.
Suggested fix direction
In the "Check changelog changes" step, when origin/$PR_BRANCH is unavailable (fork PRs), fetch the PR head ref before computing the merge base, e.g.:
git fetch origin "+refs/pull/${PR_NUMBER}/head:refs/remotes/origin/${PR_BRANCH}"
(or resolve the merge base against refs/pull/${PR_NUMBER}/merge directly, which the checkout already has).
Note: for merge_group events the current logic works, because merge-queue branches do exist under origin.
- 主要语言
- TypeScript
- 星标
- 414
- 派生
- 310
- 平均合并
- 1 天 16 小时
- 30 天内合并 PR
- 415
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 没有贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
MetaMask/core 的其他 Issue
-
platform-api-docs: `scan` strategy misses ESM-only packages, which ship `.d.ts` rather than `.d.cts`未关闭
难度 2/5 1-3 小时 新手友好度 76/100
维护者通常 1 天内回复
-
[utils] Replace the `uuid` dependency with `crypto.randomUUID()`可能已有人在做 @avantikonde 于 12 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 82/100
MetaMask/core#10210 · 1 个 reaction ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 88/100
维护者通常 1 天内回复
-
eth-json-rpc-middleware: `TransactionParamsStruct` rejects numeric `chainId`, breaking dapp transactions可能已有人在做 @truehazker 于 56 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 86/100
维护者通常 1 天内回复
-
[eth-block-tracker]: `json-rpc-engine` should be a production dependency可能已有人在做 @SnowingFox 于 70 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 68/100
维护者通常 1 天内回复
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 84/100
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 67/100
mobile-next/mobile-mcp#526 ·
维护者通常 1 天内回复
-
e2e-failure ready-to-code
难度 1/5 1 小时以内 新手友好度 73/100
redhat-developer/rhdh-plugin-export-overlays#4470 · 1 条评论 ·
维护者通常 1 天内回复