Skip to content

fix(ci): scope contributor-check merge-base to PR base ref - #51

Merged
exiao merged 2 commits into
live-configfrom
fix/attribution-base-ref
Jun 27, 2026
Merged

fix(ci): scope contributor-check merge-base to PR base ref#51
exiao merged 2 commits into
live-configfrom
fix/attribution-base-ref

Conversation

@exiao

@exiao exiao commented Jun 27, 2026

Copy link
Copy Markdown
Owner

Problem

contributor-check.yml computed MERGE_BASE=$(git merge-base origin/main HEAD) then flagged any author email in MERGE_BASE..HEAD absent from scripts/release.py AUTHOR_MAP.

Fork PRs target live-config, not main, so the merge-base with origin/main reaches the fork divergence and sweeps in all fork-divergence commit emails. Every fork PR (#46/#47/#48) failed check-attribution, flagging:

  • exiao3@gmail.com (exiao)
  • exiao@users.noreply.github.com (exiao)

Fix (root cause — option (a))

Mirror the existing lint.yml pattern: compute the merge base against the PR's actual target branch.

  • PR event: git merge-base "origin/${{ github.base_ref }}" HEAD
  • push event: fall back to HEAD~1

Added an event_name workflow_call input to contributor-check.yml (same shape as lint.yml) and wired it from ci.yml's needs.detect.outputs.event_name. A fork PR is now checked only for ITS OWN new commits.

Verification

  • actionlint clean (the one SC2086 info note is pre-existing on the untouched git log ${MERGE_BASE}..HEAD line — present on HEAD too).
  • Simulated against real history: the old origin/main merge-base scope listed exiao3@gmail.com + exiao@users.noreply.github.com; the new origin/live-config merge-base scope is empty for the branch (only PR-introduced commits).

Unblocks the attribution gate on #46/#47/#48.

Do NOT merge — Eric merges.

contributor-check.yml hard-coded git merge-base origin/main HEAD, so fork
PRs targeting live-config swept in all fork-divergence commit emails
(exiao3@gmail.com, exiao@users.noreply.github.com) and failed attribution.
Mirror lint.yml: merge-base against origin/${{ github.base_ref }} for PRs,
HEAD~1 fallback for pushes. Adds event_name workflow_call input wired from
ci.yml detect.outputs.event_name.

Patch note: ~/.hermes/plans/hermes-patches/fix-attribution-base-ref.md
@gemini-code-assist

Copy link
Copy Markdown

Note

Gemini is unable to generate a review for this pull request due to the file types involved not being currently supported.

@github-actions

github-actions Bot commented Jun 27, 2026

Copy link
Copy Markdown

🔎 Lint report: fix/attribution-base-ref vs origin/live-config

ruff

Total: 1 on HEAD, 1 on base (➖ 0)

🆕 New issues (1):

Rule Count
PLW1514 1
First entries
gateway/run.py:5594: [PLW1514] `open` in text mode without explicit `encoding` argument

✅ Fixed issues (1):

Rule Count
PLW1514 1
First entries
../../../../../tmp/lint-base/gateway/run.py:5594: [PLW1514] `open` in text mode without explicit `encoding` argument

Unchanged: 0 pre-existing issues carried over.

ty (type checker)

Total: 11572 on HEAD, 11572 on base (➖ 0)

🆕 New issues: none

✅ Fixed issues: none

Unchanged: 6093 pre-existing issues carried over.

Diagnostics are surfaced as warnings — this check never fails the build.

The base-ref-scoped contributor check now correctly limits its scope to the
PR's own commits — which are authored by exiao3@gmail.com. That email was only
mapped via its noreply form (2093036+exiao@users.noreply.github.com), so the
check still flagged it as unmapped. Add the plain gmail form (same person, the
repo owner) to AUTHOR_MAP.
@exiao
exiao merged commit 7cbcb17 into live-config Jun 27, 2026
29 of 38 checks passed
@exiao
exiao deleted the fix/attribution-base-ref branch June 27, 2026 21:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant