Skip traverse PR/MR creation for branches annotated with push=no - #1780
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #1780 +/- ##
========================================
Coverage 98.68% 98.68%
========================================
Files 45 45
Lines 5383 5384 +1
Branches 978 979 +1
========================================
+ Hits 5312 5313 +1
Misses 43 43
Partials 28 28 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
PawelLipski
force-pushed
the
fix/traverse-skip-create-pr-when-push-no
branch
from
September 9, 2026 11:24
dad766a to
fac6a22
Compare
PawelLipski
commented
Sep 9, 2026
| prs = [_pr for _pr in self._get_all_open_prs() if _pr.head == branch] | ||
| if not prs: | ||
| needs_create_pr = True | ||
| if branch_anno is None or branch_anno.qualifiers.push: |
Collaborator
Author
There was a problem hiding this comment.
Split for the sake of coverage
A push=no qualifier already means the branch should not be published, so offering to open a pull/merge request for it is inconsistent and can create a duplicate PR for someone else's branch.
PawelLipski
force-pushed
the
fix/traverse-skip-create-pr-when-push-no
branch
from
September 9, 2026 11:25
fac6a22 to
a828c03
Compare
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.
Summary
traverse --sync-github-prs/--sync-gitlab-mrsno longer offers to create a PR/MR when the branch is annotated withpush=no.push=noqualifier already means the branch should not be published; offering to open a request for it could create a duplicate PR for someone else's branch (for example aftercheckout-prsaddedrebase=no push=no).Test plan
traverse --sync-github-prs/--sync-gitlab-mrsskip apush=nosibling and still prompt for a normal siblinggit machete traverse --sync-github-prson a branch withpush=noand no open PR does not ask to create onepush=nostill gets the create prompt