You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+2-3Lines changed: 2 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -72,7 +72,7 @@ Here are a few things you can do that will increase the likelihood of your pull
72
72
73
73
Approve the mergeback PR and automerge it. Once the mergeback has been merged into main, the release is complete.
74
74
75
-
## Keeping the PR checks up to date (requires admin access)
75
+
## Keeping the PR checks up to date (admin access required)
76
76
77
77
Since the `codeql-action` runs most of its testing through individual Actions workflows, there are over two hundred jobs that need to pass in order for a PR to turn green. Managing these PR checks manually is time consuming and complex. Here is a semi-automated approach.
78
78
@@ -82,8 +82,7 @@ To regenerate the PR jobs for the action:
82
82
83
83
```sh
84
84
SHA= ####
85
-
CHECKS="$(gh api repos/github/codeql-action/commits/${SHA}/check-runs --paginate | jq --compact-output --raw-output '[.["check_runs"] | .[].name | select(contains("https://") or . == "CodeQL" or . == "LGTM.com" or . == "Update dependencies" | not)]')"
86
-
CHECKS="$(echo $CHECKS| sed -E 's|\].*\[|,|g')"# Because the gh command is paginated, the results are multiple arrays
85
+
CHECKS="$(gh api repos/github/codeql-action/commits/${SHA}/check-runs --paginate | jq --slurp --compact-output --raw-output '[.[].check_runs | .[].name | select(contains("https://") or . == "CodeQL" or . == "LGTM.com" or . == "Update dependencies" | not)]')"
87
86
echo"{\"contexts\": ${CHECKS}}"> checks.json
88
87
gh api -X "PATCH" repos/github/codeql-action/branches/main/protection/required_status_checks --input checks.json
89
88
gh api -X "PATCH" repos/github/codeql-action/branches/v1/protection/required_status_checks --input checks.json
0 commit comments