Description
Actual behavior
In a repository we enabled the setting “Delete pull request branch after merge by default”.
Additionally, the branch stage is protected.
After merging a PR from stage -> prod, the protected source branch stage was deleted automatically.
Expected behavior
Protected branches (e.g. stage) should never be deleted by auto-delete after merge.
Only non-protected PR source branches should be deleted (and only when the PR option/setting applies).
Steps to reproduce
- Create branches
prod and stage
- Protect
stage (branch protection enabled)
- Enable repo setting “Delete pull request branch after merge by default”
- Create PR
stage -> prod
- Merge PR
- Observe:
stage branch gets deleted
Gitea Version
1.25.2
Can you reproduce the bug on the Gitea demo site?
No
Log Gist
No response
Screenshots
No response
Git Version
No response
Operating System
No response
How are you running Gitea?
we are hosting gitea on our server via docker.
Database
None
Description
Actual behavior
In a repository we enabled the setting “Delete pull request branch after merge by default”.
Additionally, the branch
stageis protected.After merging a PR from
stage->prod, the protected source branchstagewas deleted automatically.Expected behavior
Protected branches (e.g.
stage) should never be deleted by auto-delete after merge.Only non-protected PR source branches should be deleted (and only when the PR option/setting applies).
Steps to reproduce
prodandstagestage(branch protection enabled)stage->prodstagebranch gets deletedGitea Version
1.25.2
Can you reproduce the bug on the Gitea demo site?
No
Log Gist
No response
Screenshots
No response
Git Version
No response
Operating System
No response
How are you running Gitea?
we are hosting gitea on our server via docker.
Database
None