[PR #2451] [MERGED] improve protected branch to add whitelist support #16404

Closed
opened 2025-11-02 12:09:49 -06:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/go-gitea/gitea/pull/2451
Author: @lunny
Created: 9/2/2017
Status: Merged
Merged: 9/14/2017
Merged by: @lunny

Base: masterHead: lunny/improve_proteced_branch


📝 Commits (9)

📊 Changes

29 files changed (+736 additions, -303 deletions)

View changed files

📝 cmd/hook.go (+25 -23)
📝 integrations/editor_test.go (+19 -6)
📝 integrations/integration_test.go (+1 -1)
📝 integrations/internal_test.go (+1 -1)
📝 models/branches.go (+112 -80)
📝 models/migrations/migrations.go (+2 -0)
models/migrations/v40.go (+55 -0)
📝 models/org.go (+5 -0)
📝 models/org_team.go (+20 -0)
📝 models/repo.go (+36 -0)
📝 modules/auth/repo_form.go (+20 -0)
📝 modules/base/tool.go (+10 -0)
📝 modules/context/repo.go (+2 -2)
📝 modules/private/branch.go (+26 -0)
modules/util/compare.go (+29 -0)
📝 options/locale/locale_en-US.ini (+11 -3)
📝 public/css/index.css (+24 -0)
📝 public/js/index.js (+10 -35)
📝 public/less/_repository.less (+33 -0)
📝 routers/private/branch.go (+23 -1)

...and 9 more files

📄 Description

This PR will add a protected branch edit page to enable or disable protected branch. It also add support to whitelist users or whitelist teams so that special users could push to the branch.

-1
-2


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/go-gitea/gitea/pull/2451 **Author:** [@lunny](https://github.com/lunny) **Created:** 9/2/2017 **Status:** ✅ Merged **Merged:** 9/14/2017 **Merged by:** [@lunny](https://github.com/lunny) **Base:** `master` ← **Head:** `lunny/improve_proteced_branch` --- ### 📝 Commits (9) - [`769d918`](https://github.com/go-gitea/gitea/commit/769d918dd748e2023b0d442a1e1f4441eb546166) improve protected branch to add whitelist support - [`75454c1`](https://github.com/go-gitea/gitea/commit/75454c100b0caac4d5721e752f64e0538488890d) fix lint - [`14098fa`](https://github.com/go-gitea/gitea/commit/14098fa73a626f60ff2f3e6a1660bbfc02bb834c) fix style check - [`cb1f1b7`](https://github.com/go-gitea/gitea/commit/cb1f1b7d23c9fffb7914d03b3f34f7402483c1c8) fix tests - [`1a6f72a`](https://github.com/go-gitea/gitea/commit/1a6f72a51df697b86bdfc80e9a7f330bb05edc4d) fix description on UI and import - [`231b024`](https://github.com/go-gitea/gitea/commit/231b024d82caf2a82bfdafdefd12b5af399a7034) fix test - [`d6d0151`](https://github.com/go-gitea/gitea/commit/d6d0151ceafaea80cd13a72264af7b7b62941172) bug fixed - [`3ee5d15`](https://github.com/go-gitea/gitea/commit/3ee5d15a98c4afbe31919f89dc299299db42aadf) fix tests and languages - [`f71a25a`](https://github.com/go-gitea/gitea/commit/f71a25ade99b8db47125e6f2c580d6c0875f317b) move isSliceInt64Eq to util pkg; improve function names & typo ### 📊 Changes **29 files changed** (+736 additions, -303 deletions) <details> <summary>View changed files</summary> 📝 `cmd/hook.go` (+25 -23) 📝 `integrations/editor_test.go` (+19 -6) 📝 `integrations/integration_test.go` (+1 -1) 📝 `integrations/internal_test.go` (+1 -1) 📝 `models/branches.go` (+112 -80) 📝 `models/migrations/migrations.go` (+2 -0) ➕ `models/migrations/v40.go` (+55 -0) 📝 `models/org.go` (+5 -0) 📝 `models/org_team.go` (+20 -0) 📝 `models/repo.go` (+36 -0) 📝 `modules/auth/repo_form.go` (+20 -0) 📝 `modules/base/tool.go` (+10 -0) 📝 `modules/context/repo.go` (+2 -2) 📝 `modules/private/branch.go` (+26 -0) ➕ `modules/util/compare.go` (+29 -0) 📝 `options/locale/locale_en-US.ini` (+11 -3) 📝 `public/css/index.css` (+24 -0) 📝 `public/js/index.js` (+10 -35) 📝 `public/less/_repository.less` (+33 -0) 📝 `routers/private/branch.go` (+23 -1) _...and 9 more files_ </details> ### 📄 Description This PR will add a protected branch edit page to enable or disable protected branch. It also add support to whitelist users or whitelist teams so that special users could push to the branch. ![-1](https://user-images.githubusercontent.com/81045/29994726-e325c294-9008-11e7-93ec-79054355ed4b.png) ![-2](https://user-images.githubusercontent.com/81045/29994727-e5c35944-9008-11e7-9542-28faec638ea7.png) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2025-11-02 12:09:49 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#16404