diff --git a/Jenkinsfile b/Jenkinsfile index 5c67b3f..c4bc28d 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -402,6 +402,8 @@ def unprotectBranch(String repo, String branch) { -H 'Authorization: token '"\$GITEA_TOKEN" \ -w '%{http_code}' \ -o output.json) + jq '.' output.json + test \$HTTP_CODE -eq 204 || test \$HTTP_CODE -eq 404 """, returnStatus: true ) == 0