Skip to content

feat(release): Ruleset-aware push with PR creation fallback - #125

Merged
thomas-vilte merged 2 commits into
masterfrom
dev
Jul 31, 2026
Merged

feat(release): Ruleset-aware push with PR creation fallback#125
thomas-vilte merged 2 commits into
masterfrom
dev

Conversation

@thomas-vilte

@thomas-vilte thomas-vilte commented Jul 31, 2026

Copy link
Copy Markdown
Owner

Description

I've improved the release command's resilience when pushing changes to a remote repository protected by GitHub rulesets or branch protection rules.

Specifically, when a direct git push (for commits or tags) is rejected by a ruleset, the system now detects this specific error (ErrPushRejectedByRuleset). For the release command's final push, if the direct push fails due to a ruleset, it will now automatically create a new branch (matecommit/release-vX.Y.Z), push the release changes to this new branch, and then open a Pull Request into the original base branch. This allows the release process to continue through a PR merge.

Additionally, I've updated the UI to display the specific stderr output from Git when a ruleset rejection occurs, providing clearer feedback to the user.

Fixes #

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce.

  • Unit tests
  • Integration tests
  • Manual test: (describe below)

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

Test Plan & Evidence

Suggested Manual Verification

  • API/Backend: Attach JSON response or logs as evidence of correct behavior
  • Performance: Ensure no significant latency increase
  • Unit Tests: Run go test ./... and ensure all tests pass
  • No Regressions: Verify that related features still work as expected

@thomas-vilte thomas-vilte changed the title placeholder fix(git): provide specific error for GitHub ruleset rejections Jul 31, 2026
@thomas-vilte thomas-vilte added fix Bug fixes test Testing, trials, and coverage labels Jul 31, 2026
@thomas-vilte thomas-vilte changed the title fix(git): provide specific error for GitHub ruleset rejections feat(release): Ruleset-aware push with PR creation fallback Jul 31, 2026
@thomas-vilte thomas-vilte added the feature New features label Jul 31, 2026
@thomas-vilte
thomas-vilte merged commit 8d872af into master Jul 31, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New features fix Bug fixes test Testing, trials, and coverage

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant