This commit is contained in:
Semyon Bezrukov 2024-09-11 18:38:28 +03:00
parent b76da282f2
commit e6ae1f7f74

6
Jenkinsfile vendored
View File

@ -397,9 +397,11 @@ def unprotectBranch(String repo, String branch) {
return sh (
label: "${repo}: unprotect ${branch}",
script: """
curl -s -X 'DELETE' \
HTTP_CODE=\$(curl -s -X 'DELETE' \
'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
) == 0