BM4
This commit is contained in:
parent
7247dbe4a4
commit
180496fde6
4
Jenkinsfile
vendored
4
Jenkinsfile
vendored
@ -378,7 +378,7 @@ def protectBranch(String repo, String branch) {
|
||||
curl -sv -X 'POST' \
|
||||
'https://'"\$GIT_SERVER"'/api/v1/repos/${repo}/branch_protections' \
|
||||
-H 'accept: application/json' \
|
||||
-H 'Authorization: '"\$GITEA_TOKEN" \
|
||||
-H 'Authorization: token '"\$GITEA_TOKEN" \
|
||||
-H 'Content-Type: application/json' \
|
||||
-d @-
|
||||
""",
|
||||
@ -393,7 +393,7 @@ def unprotectBranch(String repo, String branch) {
|
||||
curl -sv -X 'DELETE' \
|
||||
'https://'"\$GIT_SERVER"'/api/v1/repos/${repo}/branch_protections/${branch}' \
|
||||
-H 'accept: application/json' \
|
||||
-H 'Authorization: '"\$GITEA_TOKEN"
|
||||
-H 'Authorization: token '"\$GITEA_TOKEN"
|
||||
""",
|
||||
returnStatus: true
|
||||
) == 0
|
||||
|
Loading…
Reference in New Issue
Block a user