Skip to content

Commit

Permalink
Merge pull request #1140 from github/update-v2.1.16-548f07e3
Browse files Browse the repository at this point in the history
Merge main into releases/v2
  • Loading branch information
criemen committed Jul 13, 2022
2 parents 3f62b75 + 330d552 commit 3e7e3b3
Show file tree
Hide file tree
Showing 71 changed files with 400 additions and 1,058 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/pr-checks.yml
Expand Up @@ -90,14 +90,18 @@ jobs:
needs: [check-js, check-node-modules]
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
timeout-minutes: 45

steps:
- uses: actions/checkout@v3
- name: npm run-script test
run: npm run-script test
- name: npm test
run: |
# Run any commands referenced in package.json using Bash, otherwise
# we won't be able to find them on Windows.
npm config set script-shell bash
npm test
runner-analyze-javascript-ubuntu:
name: Runner ubuntu JS analyze
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/script/check-js.sh
Expand Up @@ -14,8 +14,8 @@ npm run-script build
# Check that repo is still clean
if [ ! -z "$(git status --porcelain)" ]; then
# If we get a fail here then the PR needs attention
>&2 echo "Failed: JavaScript files are not up to date. Run 'npm run-script build' to update"
>&2 echo "Failed: JavaScript files are not up to date. Run 'rm -rf lib && npm run-script build' to update"
git status
exit 1
fi
echo "Success: JavaScript files are up to date"
echo "Success: JavaScript files are up to date"
12 changes: 7 additions & 5 deletions .github/workflows/script/update-required-checks.sh
Expand Up @@ -2,17 +2,19 @@
# Update the required checks based on the current branch.
# Typically, this will be main.

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

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

# Ignore any checks with "https://", CodeQL, LGTM, and Update checks.
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')"
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')"

echo "$CHECKS" | jq

Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
@@ -1,5 +1,10 @@
# CodeQL Action Changelog

## 2.1.16 - 13 Jul 2022

- 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)
- 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)

## 2.1.15 - 28 Jun 2022

- 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)
Expand Down
5 changes: 4 additions & 1 deletion init/action.yml
Expand Up @@ -56,7 +56,10 @@ inputs:
This input also sets the number of threads that can later be used by the "analyze" action.
required: false
debug:
description: Enable debugging mode. This will result in more output being produced which may be useful when debugging certain issues.
description: >-
Enable debugging mode.
This will result in more output being produced which may be useful when debugging certain issues.
Debugging mode is enabled automatically when step debug logging is turned on.
required: false
default: 'false'
debug-artifact-name:
Expand Down
9 changes: 1 addition & 8 deletions lib/actions-util.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/actions-util.js.map

Large diffs are not rendered by default.

7 changes: 2 additions & 5 deletions lib/analysis-paths.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/analysis-paths.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

47 changes: 21 additions & 26 deletions lib/analysis-paths.test.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 3e7e3b3

Please sign in to comment.