BM6
This commit is contained in:
parent
b76da282f2
commit
e6ae1f7f74
6
Jenkinsfile
vendored
6
Jenkinsfile
vendored
@ -397,9 +397,11 @@ def unprotectBranch(String repo, String branch) {
|
|||||||
return sh (
|
return sh (
|
||||||
label: "${repo}: unprotect ${branch}",
|
label: "${repo}: unprotect ${branch}",
|
||||||
script: """
|
script: """
|
||||||
curl -s -X 'DELETE' \
|
HTTP_CODE=\$(curl -s -X 'DELETE' \
|
||||||
'https://'"\$GIT_SERVER"'/api/v1/repos/${repo}/branch_protections/${branchUrl}' \
|
'https://'"\$GIT_SERVER"'/api/v1/repos/${repo}/branch_protections/${branchUrl}' \
|
||||||
-H 'Authorization: token '"\$GITEA_TOKEN"
|
-H 'Authorization: token '"\$GITEA_TOKEN" \
|
||||||
|
-w '%{http_code}' \
|
||||||
|
-o output.json)
|
||||||
""",
|
""",
|
||||||
returnStatus: true
|
returnStatus: true
|
||||||
) == 0
|
) == 0
|
||||||
|
Loading…
Reference in New Issue
Block a user