Skip to content

git-obs: Add --separate-requests and --dry-run to pr create#2047

Open
fwag wants to merge 1 commit intomasterfrom
feature/pr-separate-requests
Open

git-obs: Add --separate-requests and --dry-run to pr create#2047
fwag wants to merge 1 commit intomasterfrom
feature/pr-separate-requests

Conversation

@fwag
Copy link
Collaborator

@fwag fwag commented Feb 8, 2026

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.

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
Copy link

codecov bot commented Feb 8, 2026

Codecov Report

❌ Patch coverage is 1.28205% with 77 lines in your changes missing coverage. Please review.
✅ Project coverage is 34.24%. Comparing base (df49ef5) to head (8092d57).
⚠️ Report is 15 commits behind head on master.

Files with missing lines Patch % Lines
osc/commands_git/pr_create.py 0.00% 77 Missing ⚠️
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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant