Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge main into releases/v2 #1140

Merged
merged 46 commits into from
Jul 13, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
3ff1fd9
Python-Setup: set PYTHONDONTWRITEBYTECODE=1
aibaars Jun 27, 2022
95673cf
Revert "Python-Setup: set PYTHONDONTWRITEBYTECODE=1"
aibaars Jun 27, 2022
11a46b8
Python-Setup: run auto_install_packages.py with -B flag
aibaars Jun 27, 2022
cae9a1f
Run npm build
aibaars Jun 27, 2022
41d6ac4
Remove toolcache decorator
henrymercer Jun 17, 2022
9953936
Add instructions to remove deleted JS / source map files in PR check
henrymercer Jun 28, 2022
7c1b9e6
Update changelog and version after v2.1.15
invalid-email-address Jun 28, 2022
4a887ca
Update checked-in dependencies
invalid-email-address Jun 28, 2022
3ea10cc
Merge pull request #1130 from github/mergeback/v2.1.15-to-main-3f62b754
cklin Jun 28, 2022
7ebbfcb
Run unit tests on Windows too
henrymercer Jun 15, 2022
79ec03f
Run npm scripts on using bash so Windows can find commands
henrymercer Jun 29, 2022
4792297
Fix test failures on Windows related to path separators
henrymercer Jun 16, 2022
c156049
Workaround `PATH` casing issues on Windows
henrymercer Jun 17, 2022
30681e7
Separate paths with `/` in `resolveUriToFile`
henrymercer Jun 17, 2022
c2fd5d1
Don't make temporary directories symlinks
henrymercer Jun 17, 2022
130a51d
Handle Windows absolute paths in `resolveUriToFile`
henrymercer Jun 17, 2022
53bc5e6
Merge remote-tracking branch 'origin/main' into aibaars/python-setup-…
aibaars Jun 30, 2022
ca8a203
Merge pull request #1126 from github/aibaars/python-setup-no-pycache
aibaars Jun 30, 2022
c736697
Remove toolcache decorator
henrymercer Jun 17, 2022
b1742f8
Add instructions to remove deleted JS / source map files in PR check
henrymercer Jun 28, 2022
53850d8
Enable one-click debugging via the "Enable debug logging" rerun option
henrymercer Jun 28, 2022
0c729c8
Mention that debug mode is automatically enabled when step debugging on
henrymercer Jul 1, 2022
b7da732
Add changelog note
henrymercer Jul 1, 2022
7e94a6c
Print diagnostic messages when debug logging enabled
henrymercer Jun 28, 2022
3a5fa35
Add changelog note
henrymercer Jul 1, 2022
ea8fb21
Merge pull request #1104 from github/henrymercer/remove-toolcache-dec…
henrymercer Jul 11, 2022
fc92642
Merge remote-tracking branch 'origin/main' into henrymercer/run-unit-…
henrymercer Jul 11, 2022
688508d
Merge pull request #1099 from github/henrymercer/run-unit-tests-on-wi…
henrymercer Jul 12, 2022
3dcdbc9
Unset tracing variables after finalizing databases.
criemen Jul 12, 2022
b380175
Merge pull request #1133 from github/henrymercer/log-diagnostics-when…
henrymercer Jul 12, 2022
e655fb3
Use `core.isDebug()` instead of accessing env var
henrymercer Jul 12, 2022
b316baa
Merge remote-tracking branch 'origin/main' into henrymercer/one-click…
henrymercer Jul 12, 2022
b45ac1f
Cleanup: Use optional chaining in a couple of places
henrymercer Jul 12, 2022
e1ec697
Merge pull request #1137 from github/criemen/fix-end-tracing
criemen Jul 12, 2022
dca60ba
Merge remote-tracking branch 'origin/main' into henrymercer/one-click…
henrymercer Jul 12, 2022
d61e3fd
Fix shellcheck errors
henrymercer Jul 12, 2022
0a5dad3
Allow authenticating via the GitHub CLI
henrymercer Jul 12, 2022
fbbd1dc
Fix extra double quote
henrymercer Jul 12, 2022
816b3e9
Update failure message
henrymercer Jul 12, 2022
1e7f770
Merge pull request #1132 from github/henrymercer/one-click-debug
henrymercer Jul 12, 2022
4cb248b
Merge branch 'main' into henrymercer/drop-token-check
henrymercer Jul 12, 2022
d750c6d
Merge pull request #1138 from github/henrymercer/drop-token-check
henrymercer Jul 12, 2022
7ce9ef9
Use concat instead of push around `listFolders`
aeisenberg Jul 12, 2022
a844fef
Merge branch 'main' into aeisenberg/concat-not-push
henrymercer Jul 13, 2022
548f07e
Merge pull request #1139 from github/aeisenberg/concat-not-push
aeisenberg Jul 13, 2022
330d552
Update changelog for v2.1.16
invalid-email-address Jul 13, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions .github/workflows/pr-checks.yml
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
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.

Loading