Repository navigation
Compare submissions against their merge base - #973
Merged
Merged
Conversation
The category file was compared with master at the time the bot runs. When other pull requests were merged in the meantime, their entries showed up as changes too, and an up to date branch was converted to draft.
6 tasks done
There was a problem hiding this comment.
🟢 Approval recommended
The focused change fixes the unpinned baseline comparison without any identified blocking issues.
No open issues 🎉
What changed in this PR
Fixes #974 by comparing submission contents against the pull request’s merge base, preventing unrelated merges from causing false draft conversions.
Changes:
- Pins the baseline content request to the merge-base SHA.
- Removes the unsupported
pull_numberargument fromgetContent. - Preserves the existing behind-branch check.
| File | Description |
|---|---|
| src/plugins/pull_request.opened.default.ts | Passes the merge-base SHA into getFileDiff and uses it when fetching baseline content. |
Review effort: Balanced
ludeeus
approved these changes
Oct 17, 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.
getFileDiff()compared the category file of the pull request withmasteras it is when the bot runs, becausegetContentwas called without aref. hacs/default merges several submissions a day into the same file. When one of those lands between the submitter updating their branch and the bot handling the event, its entry shows up as a second change, and the pull request is converted to draft with "Your branch seems out of date". Updating the branch doesn't help, since it isn't behind. hacs/default#8710 got stuck on this repeatedly.The file is now read at the merge base, which the
compareCommitsWithBaseheadcall a few lines earlier already returns. That compares exactly what the pull request changes. The separate check for a branch that is behind stays as it is.The
pull_numberargument is dropped,getContentdoesn't take it.Checked with
tscand prettier. The build reports the same 7 errors asmain(inindex.ts,tasks.tsandnode:async_hooks), none in this file.Fixes #974