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 e1a2b47 commit 3d785e3
Showing 1 changed file with 9 additions and 14 deletions.
23 changes: 9 additions & 14 deletions .github/workflows/newcheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,13 @@ jobs:
BRANCH_NAME=$(echo $line | cut -d ',' -f 2)
CHECK=$(echo $line | cut -d ',' -f 3)
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\"]}'
set -x # Enable debugging
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

0 comments on commit 3d785e3

Please sign in to comment.