]> source.dussan.org Git - gitea.git/commit
Make admins adhere to branch protection rules (#32248)
authorTim <tim@datenknoten.me>
Wed, 23 Oct 2024 04:39:43 +0000 (06:39 +0200)
committerGitHub <noreply@github.com>
Wed, 23 Oct 2024 04:39:43 +0000 (12:39 +0800)
commitde2ad2e1b177ed1c3412761c54b28579f8ecbb00
treea8124fa2c61116adfe96e41b89335202c2955b55
parent620f19610ef747412a9e4265c6b20fa560663f17
Make admins adhere to branch protection rules (#32248)

This introduces a new flag `BlockAdminMergeOverride` on the branch
protection rules that prevents admins/repo owners from bypassing branch
protection rules and merging without approvals or failing status checks.

Fixes #17131

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: Giteabot <teabot@gitea.io>
14 files changed:
models/git/protected_branch.go
models/migrations/migrations.go
models/migrations/v1_23/v306.go [new file with mode: 0644]
modules/structs/repo_branch.go
options/locale/locale_en-US.ini
routers/api/v1/repo/branch.go
routers/web/repo/setting/protected_branch.go
services/convert/convert.go
services/forms/repo_form.go
services/pull/check.go
templates/repo/issue/view_content/pull.tmpl
templates/repo/settings/protected_branch.tmpl
templates/swagger/v1_json.tmpl
tests/integration/pull_merge_test.go