Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

CI: "Validate changelog diffs" job fails on every fork-sourced pull request

Đang mở Phù hợp với người mới
#10,579 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
84/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
git, github-actions
Lĩnh vực
ci-cd

Hướng nghiên cứu

Đọc .github/workflows/lint-build-test.yml và .github/actions/check-merge-queue-changelogs, sau đó kiểm tra bước Validate changelog diffs và ngữ cảnh sự kiện pull request của bước đó. Xác minh rằng các pull request có nguồn từ fork có thể hoàn tất việc xác thực các khác biệt của changelog, đồng thời hành vi của merge_group và các kiểm tra changelog theo từng package vẫn tiếp tục đạt.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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-package Validate changelog (24.x, @metamask/assets-controller) job passes for the same commits).
  • PR #10229 (fork branch feat/assets-transient-loading-state) — the same job shows FAILURE on 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.

Ngôn ngữ chính
TypeScript
Star
414
Fork
310
Merge trung bình
1 ngày 4 giờ
Pull request đã merge (30 ngày)
388

Chuẩn bị môi trường

  • Không có Dockerfile hay tệp Docker Compose
  • Có mẫu pull request
  • Không có hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của MetaMask/core

Tất cả issue của MetaMask/core

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.