Skip to content

Commit 533ce91

Browse files
committed
Merge remote-tracking branch 'origin/main' into henrymercer/run-atm-on-windows
2 parents 395afb1 + ace076b commit 533ce91

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+630
-465
lines changed

.github/update-release-branch.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ def main():
292292
conflicted_files = run_git('diff', '--name-only', '--diff-filter', 'U').splitlines()
293293
if len(conflicted_files) > 0:
294294
run_git('add', '.')
295-
run_git('commit', '--no-edit')
295+
run_git('commit', '--no-edit')
296296

297297
# Migrate the package version number from a v2 version number to a v1 version number
298298
print(f'Setting version number to {version}')

.github/workflows/__packaging-config-inputs-js.yml

+24-6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/workflows/__packaging-config-js.yml

+23-5
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/workflows/__packaging-inputs-js.yml

+24-6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/workflows/__split-workflow.yml

+14-6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
#!/usr/bin/env bash
2+
# Update the required checks based on the current branch.
3+
# Typically, this will be main.
4+
5+
if [ -z "$GITHUB_TOKEN" ]; then
6+
echo "Failed: No GitHub token found. This script requires admin access to `github/codeql-action`."
7+
exit 1
8+
fi
9+
10+
if [ "$#" -eq 1 ]; then
11+
# If we were passed an argument, pass it as a query to fzf
12+
GITHUB_SHA="$@"
13+
elif [ "$#" -gt 1 ]; then
14+
echo "Usage: $0 [SHA]"
15+
echo "Update the required checks based on the SHA, or main."
16+
elif [ -z "$GITHUB_SHA" ]; then
17+
# If we don't have a SHA, use main
18+
GITHUB_SHA="$(git rev-parse main)"
19+
fi
20+
21+
echo "Getting checks for $GITHUB_SHA"
22+
23+
# Ignore any checks with "https://", CodeQL, LGTM, and Update checks.
24+
CHECKS="$(gh api repos/github/codeql-action/commits/${GITHUB_SHA}/check-runs --paginate | jq --slurp --compact-output --raw-output '[.[].check_runs | .[].name | select(contains("https://") or . == "CodeQL" or . == "LGTM.com" or contains("Update") | not)] | sort')"
25+
26+
echo "$CHECKS" | jq
27+
28+
echo "{\"contexts\": ${CHECKS}}" > checks.json
29+
30+
for BRANCH in main releases/v2 releases/v1; do
31+
echo "Updating $BRANCH"
32+
gh api --silent -X "PATCH" "repos/github/codeql-action/branches/$BRANCH/protection/required_status_checks" --input checks.json
33+
done
34+
35+
rm checks.json

CHANGELOG.md

+5
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@
44

55
No user facing changes.
66

7+
## 2.1.10 - 10 May 2022
8+
9+
- Update default CodeQL bundle version to 2.9.5. [#1056](https://github.com/github/codeql-action/pull/1056)
10+
- When `wait-for-processing` is enabled, the workflow will now fail if there were any errors that occurred during processing of the analysis results.
11+
712
## 2.1.9 - 27 Apr 2022
813

914
- Add `working-directory` input to the `autobuild` action. [#1024](https://github.com/github/codeql-action/pull/1024)

CONTRIBUTING.md

+4-15
Original file line numberDiff line numberDiff line change
@@ -80,22 +80,11 @@ Here are a few things you can do that will increase the likelihood of your pull
8080

8181
## Keeping the PR checks up to date (admin access required)
8282

83-
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.
83+
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. You can regenerate the checks automatically by running the [update-required-checks.sh](.github/workflows/script/update-required-checks.sh) script:
8484

85-
To regenerate the PR jobs for the action:
86-
87-
1. From a terminal, run the following commands (replace `SHA` with the sha of the commit whose checks you want to use, typically this should be the latest from `main`):
88-
89-
```sh
90-
SHA= ####
91-
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" or . == "Update Supported Enterprise Server Versions" | not)]')"
92-
echo "{\"contexts\": ${CHECKS}}" > checks.json
93-
gh api -X "PATCH" repos/github/codeql-action/branches/main/protection/required_status_checks --input checks.json
94-
gh api -X "PATCH" repos/github/codeql-action/branches/releases/v2/protection/required_status_checks --input checks.json
95-
gh api -X "PATCH" repos/github/codeql-action/branches/releases/v1/protection/required_status_checks --input checks.json
96-
````
97-
98-
2. Go to the [branch protection rules settings page](https://github.com/github/codeql-action/settings/branches) and validate that the rules have been updated.
85+
1. By default, this script retrieves the checks from the latest SHA on `main`, so make sure that your `main` branch is up to date.
86+
2. Run the script. If there's a reason to, you can pass in a different SHA as a CLI argument.
87+
3. After running, go to the [branch protection rules settings page](https://github.com/github/codeql-action/settings/branches) and validate that the rules for `main`, `v1`, and `v2` have been updated.
9988

10089
## Resources
10190

lib/actions-util.js

+1-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/actions-util.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/analyze-action-env.test.js

+7-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/analyze-action-env.test.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)