Repository navigation
Fix: stale forks fail the signature check and get told to remove other people's files - #54
Merged
Merged
Conversation
The check diffed main's current tip against the PR head (two dots), so a student who forked before other signatures were merged saw those as deletions in their PR, failed, and the bot told them to remove other people's files. Use a three-dot diff (merge base), which is what the PR's Files changed tab shows.
Contributor
|
Hi @geetxnshgoyal 👋 thanks for signing the workbook! The check found a problem:
How to fix it (in your clone, on the same branch as this PR): # fix the file as described above, then:
git add -A
git commit -m "Fix signature"
git pushYour file should look like: # Your Real Name
- **GitHub:** @geetxnshgoyal
- **Batch:** 2026
- **I'm here to:** your own line
- **One thing I've built:** a link, or nothing yetPush to this same PR. Don't open a new one. This comment updates itself each time the check re-runs. |
This was referenced Sep 22, 2026
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.
Bug
The check compared current
mainwith the PR head (git diff base head). A student who forked before other signatures were merged, like Prince in #44, saw every newer signature listed as a deletion in their PR. They failed with "This PR changes 8 files", and the bot told them to remove other people's files.Fix
One line:
git diff base...head(three dots) compares against the merge base, the point where the student's branch started. That's exactly what the PR's Files changed tab shows.Tested
maingains two other signatures, then the PR is checked. It now shows onlyA signatures/<user>.mdand passes. The old code listed the other signatures as deletions, which matches the Sign the workbook: Prince sharma #44 screenshot.This PR's own check fails by design (it isn't a signature), so it needs an admin merge. After merging, re-run the failed checks on open PRs so the bot corrects any wrong comments.