Skip to content

Commit

Permalink
Use PUT (not POST) for protection
Browse files Browse the repository at this point in the history
  • Loading branch information
nemchik committed Oct 6, 2023
1 parent c52e3f9 commit 4a2c5cd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion roles/generate-jenkins/templates/Jenkinsfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -1181,7 +1181,7 @@ pipeline {
steps {
echo "Setting up protection for release branch {{ ls_branch }}"
sh '''#! /bin/bash
curl -H "Authorization: token ${GITHUB_TOKEN}" -X POST https://github.com/repos/${LS_USER}/${LS_REPO}/branches/{{ ls_branch }}/protection \
curl -H "Authorization: token ${GITHUB_TOKEN}" -X PUT https://github.com/repos/${LS_USER}/${LS_REPO}/branches/{{ ls_branch }}/protection \
-d $(jq -c . << EOF
{
"required_status_checks": null,
Expand Down

0 comments on commit 4a2c5cd

Please sign in to comment.