Skip to content

feat(pull): add bypass-rules opt-in and expose scheduled auto-merge via API#38404

Open
bircni wants to merge 4 commits into
go-gitea:mainfrom
bircni:feat/pull-auto-merge-bypass
Open

feat(pull): add bypass-rules opt-in and expose scheduled auto-merge via API#38404
bircni wants to merge 4 commits into
go-gitea:mainfrom
bircni:feat/pull-auto-merge-bypass

Conversation

@bircni

@bircni bircni commented Jul 10, 2026

Copy link
Copy Markdown
Member

Reworks the pull request merge box to match GitHub's behaviour and surfaces auto-merge state on the API.

Merge box

  • Bypassing branch protection is now an explicit, red "Merge without waiting for requirements to be met (bypass rules)" checkbox above the merge button, instead of a silent, automatic force-merge for admins.
  • With unmet requirements and no bypass, the default action is now Enable auto merge — so admins (and bypass-allowlisted users) can schedule an auto-merge, not only force-merge.
  • Ticking bypass switches to an immediate merge (button turns red); the two are mutually exclusive, so force_merge and merge_when_checks_succeed are never both sent.
  • The merge-style dropdown now only selects the style and is hidden when a single style is allowed. The button and the pending-schedule notice name the style (e.g. "Enable auto merge (squash)").

API

  • PullRequest responses gain a GitHub-compatible auto_merge object (enabled_by, merge_method, commit_title, commit_message), or null when not scheduled — on both the single-PR and list endpoints (batched to avoid N+1). Swagger regenerated.

Screenshots

image image

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Jul 10, 2026
@bircni bircni force-pushed the feat/pull-auto-merge-bypass branch from c850ce7 to bf49b39 Compare July 10, 2026 22:53
@bircni bircni marked this pull request as ready for review July 12, 2026 11:24
@bircni bircni requested a review from Zettat123 July 12, 2026 11:24
@github-actions github-actions Bot added the type/feature Completely new functionality. Can only be merged if feature freeze is not active. label Jul 12, 2026
@bircni bircni added this to the 28.0.0 milestone Jul 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. type/feature Completely new functionality. Can only be merged if feature freeze is not active.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants