Skip to content

Commit 3e7e3b3

Browse files
authored
Merge pull request #1140 from github/update-v2.1.16-548f07e3
Merge main into releases/v2
2 parents 3f62b75 + 330d552 commit 3e7e3b3

Some content is hidden

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

71 files changed

+400
-1058
lines changed

.github/workflows/pr-checks.yml

+7-3
Original file line numberDiff line numberDiff line change
@@ -90,14 +90,18 @@ jobs:
9090
needs: [check-js, check-node-modules]
9191
strategy:
9292
matrix:
93-
os: [ubuntu-latest, macos-latest]
93+
os: [ubuntu-latest, macos-latest, windows-latest]
9494
runs-on: ${{ matrix.os }}
9595
timeout-minutes: 45
9696

9797
steps:
9898
- uses: actions/checkout@v3
99-
- name: npm run-script test
100-
run: npm run-script test
99+
- name: npm test
100+
run: |
101+
# Run any commands referenced in package.json using Bash, otherwise
102+
# we won't be able to find them on Windows.
103+
npm config set script-shell bash
104+
npm test
101105
102106
runner-analyze-javascript-ubuntu:
103107
name: Runner ubuntu JS analyze

.github/workflows/script/check-js.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ npm run-script build
1414
# Check that repo is still clean
1515
if [ ! -z "$(git status --porcelain)" ]; then
1616
# If we get a fail here then the PR needs attention
17-
>&2 echo "Failed: JavaScript files are not up to date. Run 'npm run-script build' to update"
17+
>&2 echo "Failed: JavaScript files are not up to date. Run 'rm -rf lib && npm run-script build' to update"
1818
git status
1919
exit 1
2020
fi
21-
echo "Success: JavaScript files are up to date"
21+
echo "Success: JavaScript files are up to date"

.github/workflows/script/update-required-checks.sh

+7-5
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,19 @@
22
# Update the required checks based on the current branch.
33
# Typically, this will be main.
44

5-
if [ -z "$GITHUB_TOKEN" ]; then
6-
echo "Failed: No GitHub token found. This script requires admin access to `github/codeql-action`."
5+
if ! gh auth status 2>/dev/null; then
6+
gh auth status
7+
echo "Failed: Not authorized. This script requires admin access to github/codeql-action through the gh CLI."
78
exit 1
89
fi
910

1011
if [ "$#" -eq 1 ]; then
11-
# If we were passed an argument, pass it as a query to fzf
12-
GITHUB_SHA="$@"
12+
# If we were passed an argument, use that as the SHA
13+
GITHUB_SHA="$0"
1314
elif [ "$#" -gt 1 ]; then
1415
echo "Usage: $0 [SHA]"
1516
echo "Update the required checks based on the SHA, or main."
17+
exit 1
1618
elif [ -z "$GITHUB_SHA" ]; then
1719
# If we don't have a SHA, use main
1820
GITHUB_SHA="$(git rev-parse main)"
@@ -21,7 +23,7 @@ fi
2123
echo "Getting checks for $GITHUB_SHA"
2224

2325
# 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") or contains("update") | not)] | unique | sort')"
26+
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") or contains("update") | not)] | unique | sort')"
2527

2628
echo "$CHECKS" | jq
2729

CHANGELOG.md

+5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# CodeQL Action Changelog
22

3+
## 2.1.16 - 13 Jul 2022
4+
5+
- You can now quickly debug a job that uses the CodeQL Action by re-running the job from the GitHub UI and selecting the "Enable debug logging" option. [#1132](https://github.com/github/codeql-action/pull/1132)
6+
- You can now see diagnostic messages produced by the analysis in the logs of the `analyze` Action by enabling debug mode. To enable debug mode, pass `debug: true` to the `init` Action, or [enable step debug logging](https://docs.github.com/en/actions/monitoring-and-troubleshooting-workflows/enabling-debug-logging#enabling-step-debug-logging). This feature is available for CodeQL CLI version 2.10.0 and later. [#1133](https://github.com/github/codeql-action/pull/1133)
7+
38
## 2.1.15 - 28 Jun 2022
49

510
- CodeQL query packs listed in the `packs` configuration field will be skipped if their target language is not being analyzed in the current Actions job. Previously, this would throw an error. [#1116](https://github.com/github/codeql-action/pull/1116)

init/action.yml

+4-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,10 @@ inputs:
5656
This input also sets the number of threads that can later be used by the "analyze" action.
5757
required: false
5858
debug:
59-
description: Enable debugging mode. This will result in more output being produced which may be useful when debugging certain issues.
59+
description: >-
60+
Enable debugging mode.
61+
This will result in more output being produced which may be useful when debugging certain issues.
62+
Debugging mode is enabled automatically when step debug logging is turned on.
6063
required: false
6164
default: 'false'
6265
debug-artifact-name:

lib/actions-util.js

+1-8
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/analysis-paths.js

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

lib/analysis-paths.js.map

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

lib/analysis-paths.test.js

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

0 commit comments

Comments
 (0)