Skip to content

Commit

Permalink
Update newcheck.yml
Browse files Browse the repository at this point in the history
Signed-off-by: Rakshith B <[email protected]>
  • Loading branch information
Rakshithb1 authored Jan 16, 2024
1 parent c887d1d commit e1a2b47
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions .github/workflows/newcheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,16 @@ jobs:
BRANCH_NAME=$(echo $line | cut -d ',' -f 2)
CHECK=$(echo $line | cut -d ',' -f 3)
# Create a branch protection rule
curl -X PUT \
-H "Authorization: Bearer $G_TOKEN" \
-H "Accept: application/vnd.github.v3+json" \
"https://api.github.com/repos/$REPO_NAME/branches/$BRANCH_NAME/protection" \
-d "{
\"required_status_checks\": {
\"contexts\": [\"$CHECK\"]
}
}"
curl -L \
-X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer $G_TOKEN" \
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/repos/$REPO_NAME/branches/$BRANCH_NAME/protection/required_status_checks/contexts \
-d '{"contexts":[\"$CHECK\"]}'
done
Expand Down

0 comments on commit e1a2b47

Please sign in to comment.