Repository navigation
ci: comment on pull requests that overlap other open pull requests - #149
Merged
Merged
Conversation
Co-Authored-By: Claude <noreply@anthropic.com>
Owner
|
It would also be useful if your CI, which delivers labels, made the "need rebase" label red (in a separate PR). Does GitHub allow this? |
9 tasks done
Collaborator
Author
|
Yes — labels created by actions default to grey, but their color can be set through the API. Opened #189: a small workflow that sets color and description for |
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.
What
Git only reports a conflict after the first PR is merged, and by then the other author has done the work twice. Adds
tools/pr_overlap.pyand a workflow that comments on every open PR that overlaps another one:main, then pairs are merged with each other (git merge-tree, nothing is pushed), so only "merge one, break the other" shows, with the clashing lines onmainlinked. PRs that already conflict withmainare left to theneeds rebaselabel. Touching the same file in different places is not reported.APS5_VABIfunction.Pairs listed in Depends on are skipped, in either direction. PRs by the same author only get the "same new files" check. The comment is edited in place and deleted when the overlap goes away. It runs hourly and on push to
main, like the labels, with nopull_request_target.Locally, before opening a PR:
python3 tools/pr_overlap.py --branch HEAD.On today's
main(2021fa6) it would comment on 13 of the 44 open PRs. Some examples:scePlayerInvitationDialogTerminateandscePlayerInvitationDialogUpdateStatus.core/libs/prx/libSceAgcDriver/tests/Mesh.cpp.Texture.cppat L212-213: feat(agc): apply a texture descriptor's MIN_LOD clamp through the image view #130 inserts after line 212 and feat(shader): support 24-bit high products and fix image sample variants #148 changes line 213.tools/ShaderReplay.cppat L40, L100 and L112.core/libs/CMakeLists.txt, at lines 208 and 409, and are not reported.Preview of the comment those PRs would get, rendered on my fork with the links pointed back here: #147, #68, #130.
Tested
.mdthat it follows git's own rules: lines 10 and 250 merge cleanly, while 10 and 11, or the same line, conflict.updated_at).Checklist
main; no other open PR implements the same functionsUnimplemented paths throw; silent stubs are listed in TechnicalDebtn/a.mdfiles or images added to the repositoryNew third-party code is a submodule built from sourcen/aGeneric behaviour, not specific to one titlen/a