mirror of
https://github.com/aljazceru/gitpear.git
synced 2025-12-17 14:14:22 +01:00
@@ -61,6 +61,7 @@ function revokeAccessFromUser (repoName, user) {
|
|||||||
|
|
||||||
function addProtectedBranch (repoName, branch) {
|
function addProtectedBranch (repoName, branch) {
|
||||||
const acl = getACL(repoName)
|
const acl = getACL(repoName)
|
||||||
|
if (acl.protectedBranches.includes(branch)) throw new Error(`${branch} is already protected`)
|
||||||
acl.protectedBranches.push(branch)
|
acl.protectedBranches.push(branch)
|
||||||
setACL(repoName, acl)
|
setACL(repoName, acl)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user