fix(ci): scope contributor-check merge-base to PR base ref - #51
Merged
Conversation
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
|
Note Gemini is unable to generate a review for this pull request due to the file types involved not being currently supported. |
🔎 Lint report:
|
| 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.
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.
Problem
contributor-check.ymlcomputedMERGE_BASE=$(git merge-base origin/main HEAD)then flagged any author email inMERGE_BASE..HEADabsent fromscripts/release.pyAUTHOR_MAP.Fork PRs target live-config, not main, so the merge-base with
origin/mainreaches the fork divergence and sweeps in all fork-divergence commit emails. Every fork PR (#46/#47/#48) failedcheck-attribution, flagging:exiao3@gmail.com(exiao)exiao@users.noreply.github.com(exiao)Fix (root cause — option (a))
Mirror the existing
lint.ymlpattern: compute the merge base against the PR's actual target branch.git merge-base "origin/${{ github.base_ref }}" HEADHEAD~1Added an
event_nameworkflow_callinput tocontributor-check.yml(same shape aslint.yml) and wired it fromci.yml'sneeds.detect.outputs.event_name. A fork PR is now checked only for ITS OWN new commits.Verification
actionlintclean (the one SC2086 info note is pre-existing on the untouchedgit log ${MERGE_BASE}..HEADline — present on HEAD too).origin/mainmerge-base scope listedexiao3@gmail.com+exiao@users.noreply.github.com; the neworigin/live-configmerge-base scope is empty for the branch (only PR-introduced commits).Unblocks the attribution gate on #46/#47/#48.
Do NOT merge — Eric merges.