git-obs: Add --separate-requests and --dry-run to pr create#2047
Open
git-obs: Add --separate-requests and --dry-run to pr create#2047
Conversation
This introduces the ability to create multiple pull requests at once for projects managing multiple packages. Key changes: - `pr create --separate-requests`: Automatically discovers packages using `_manifest` (if present) or top-level directories. It iterates through them and creates a PR for each if changes are detected. - `pr create --dry-run`: Allows previewing the operations (source/target details, title, description) without actually creating the pull request on the server. - Refactored `pr create` logic to separate argument parsing from the creation action, enabling reuse for the batch operation. - Improved handling of "detached HEAD" state in `gitea_api.Git`: `current_branch` now returns `None` instead of an empty string, and the command raises a helpful error message instead of failing on an empty string check. - Added early exit optimization for local packages that match the target commit.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #2047 +/- ##
==========================================
- Coverage 34.30% 34.24% -0.07%
==========================================
Files 188 188
Lines 25689 25771 +82
==========================================
+ Hits 8813 8824 +11
- Misses 16876 16947 +71 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
This introduces the ability to create multiple pull requests at once for projects managing multiple packages.
Key changes:
pr create --separate-requests: Automatically discovers packages using_manifest(if present) or top-level directories. It iterates through them and creates a PR for each if changes are detected.pr create --dry-run: Allows previewing the operations (source/target details, title, description) without actually creating the pull request on the server.pr createlogic to separate argument parsing from the creation action, enabling reuse for the batch operation.gitea_api.Git:current_branchnow returnsNoneinstead of an empty string, and the command raises a helpful error message instead of failing on an empty string check.