Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: github/codeql-action
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v1.1.9
Choose a base ref
...
head repository: github/codeql-action
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v1.1.10
Choose a head ref

Commits on Apr 27, 2022

  1. Copy the full SHA
    0256599 View commit details
  2. Update changelog and version after v2.1.9

    github-actions[bot] committed Apr 27, 2022
    Copy the full SHA
    016ec75 View commit details
  3. Update checked-in dependencies

    github-actions[bot] committed Apr 27, 2022
    Copy the full SHA
    04f504c View commit details

Commits on Apr 28, 2022

  1. Merge pull request #1047 from github/mergeback/v2.1.9-to-main-7502d6e9

    Mergeback v2.1.9 refs/heads/releases/v2 into main
    edoardopirovano authored Apr 28, 2022
    Copy the full SHA
    6ed7f70 View commit details
  2. Tweak wording of message

    henrymercer committed Apr 28, 2022
    Copy the full SHA
    5227afa View commit details
  3. Copy the full SHA
    35ef6a2 View commit details
  4. Copy the full SHA
    02083c3 View commit details
  5. Copy the full SHA
    2bf00f7 View commit details
  6. Merge pull request #1045 from github/henrymercer/prompt-v1-to-v2-upgr…

    …ades
    
    Prompt customers to upgrade from v1 to v2
    henrymercer authored Apr 28, 2022
    Copy the full SHA
    0c3c093 View commit details
  7. Copy the full SHA
    7c2be06 View commit details
  8. Don't wait for processing in test mode

    In test mode, we don't upload results, so there's no point waiting for
    processing.
    henrymercer committed Apr 28, 2022
    Copy the full SHA
    ea676e3 View commit details

Commits on Apr 29, 2022

  1. Allow pack specifiers to include paths

    Also, this cleans up our pack-related integration tests.
    We are now testing with the most recent CLIs.
    aeisenberg committed Apr 29, 2022
    Copy the full SHA
    06b15c2 View commit details
  2. Merge pull request #1050 from github/henrymercer/dont-wait-for-proces…

    …sing-in-test-mode
    
    Don't wait for processing in test mode
    henrymercer authored Apr 29, 2022
    Copy the full SHA
    ceeddf2 View commit details
  3. Use the --resolve-query-specs parameter of pack download

    This will allow the command to resolve packs with paths.
    
    Also, use a more concise version of `tr`.
    aeisenberg committed Apr 29, 2022
    Copy the full SHA
    922dc2b View commit details
  4. Copy the full SHA
    b11fe85 View commit details

Commits on Apr 30, 2022

  1. Copy the full SHA
    a73e506 View commit details

Commits on May 2, 2022

  1. Merge pull request #1049 from github/aeisenberg/packs-with-paths

    Allow running packs with paths
    aeisenberg authored May 2, 2022
    Copy the full SHA
    0235de0 View commit details
  2. Update CONTRIBUTING.md

    Clarify instructions for updating required checks
    aeisenberg authored May 2, 2022
    Copy the full SHA
    9a6bf18 View commit details
  3. Update CONTRIBUTING.md

    aeisenberg authored May 2, 2022
    Copy the full SHA
    c9882be View commit details
  4. Merge pull request #1052 from github/aeisenberg/required-checks

    Update CONTRIBUTING.md
    aeisenberg authored May 2, 2022
    Copy the full SHA
    8f84542 View commit details
  5. Add workflow to regenerate required checks

    Update contributing guide.
    Ensure this workflow runs once a week.
    aeisenberg committed May 2, 2022
    Copy the full SHA
    b71f20d View commit details
  6. Merge pull request #1053 from github/aeisenberg/update-checks

    Add workflow to regenerate required checks
    aeisenberg authored May 2, 2022
    Copy the full SHA
    0fb7838 View commit details
  7. Copy the full SHA
    06d4e82 View commit details
  8. Merge pull request #1054 from github/aeisenberg/update-checks

    Add permissions to workflow
    aeisenberg authored May 2, 2022
    Copy the full SHA
    7b66e72 View commit details

Commits on May 3, 2022

  1. Fix processing errors being caught and logged as a warning rather tha…

    …n failing the workflow run.
    chrisgavin committed May 3, 2022
    Copy the full SHA
    366e88c View commit details
  2. Merge pull request #1055 from github/fix-status-error-being-caught

    Fix processing errors being caught and logged as a warning rather than failing the workflow run.
    chrisgavin authored May 3, 2022
    Copy the full SHA
    96bc9c3 View commit details
  3. Update codeql to 2.9.1

    alexet committed May 3, 2022
    Copy the full SHA
    3c6dd30 View commit details

Commits on May 5, 2022

  1. Merge pull request #1056 from github/alexet/update-2.9.1

    Update codeql to 2.9.1
    alexet authored May 5, 2022
    Copy the full SHA
    dd56e95 View commit details

Commits on May 9, 2022

  1. Create update-required-checks script

    This also removes the .github/workflows/update-required-checks.yml
    workflow. This script needs to be run locally by someone who has
    admin privileges on the repo.
    aeisenberg committed May 9, 2022
    Copy the full SHA
    827fd55 View commit details

Commits on May 10, 2022

  1. Merge pull request #1060 from github/aeisenberg/required-checks-script

    Create update-required-checks script
    aeisenberg authored May 10, 2022
    Copy the full SHA
    7cf0ed5 View commit details
  2. Update changelog for v2.1.10

    github-actions[bot] committed May 10, 2022
    Copy the full SHA
    f8eea91 View commit details
  3. Merge pull request #1062 from github/update-v2.1.10-7cf0ed5e

    Merge main into releases/v2
    alexet authored May 10, 2022
    Copy the full SHA
    75b4f1c View commit details

Commits on May 11, 2022

  1. Remove an extraneous commit during the release process

    We only need to run `git commit` after the `git merge` call if there were conflicts.
    henrymercer authored May 11, 2022
    Copy the full SHA
    3bb6c41 View commit details
  2. Merge pull request #1065 from github/henrymercer/remove-extraneous-co…

    …mmit
    
    Remove an extraneous commit during the release process
    henrymercer authored May 11, 2022
    Copy the full SHA
    03e2e3c View commit details
  3. Fix integration tests on v1

    The GitHub API client coerces `fake-server-url` to the Dotcom API URL,
    which means commands like `util.getGitHubVersion` will call the Dotcom
    API with the `fake-token`, resulting in 401s.
    
    We therefore use the Dotcom URL instead and additionally stub
    `util.getGitHubVersion` as a good practice (it's no longer necessary).
    henrymercer committed May 11, 2022
    Copy the full SHA
    4e0668d View commit details
  4. Merge pull request #1069 from github/henrymercer/fix-integration-test…

    …s-on-v1
    
    Fix integration tests on v1
    henrymercer authored May 11, 2022
    Copy the full SHA
    2f58583 View commit details
  5. Revert "Update version and changelog for v1.1.9"

    This reverts commit e34f3ea.
    github-actions[bot] committed May 11, 2022
    Copy the full SHA
    c1672e5 View commit details
  6. Revert "Update checked-in dependencies"

    This reverts commit e3983ef.
    github-actions[bot] committed May 11, 2022
    Copy the full SHA
    93c2093 View commit details
  7. Merge remote-tracking branch 'origin/releases/v2' into update-v1.1.10…

    …-2f58583a
    github-actions[bot] committed May 11, 2022
    Copy the full SHA
    ab69202 View commit details
  8. Update version and changelog for v1.1.10

    github-actions[bot] committed May 11, 2022
    Copy the full SHA
    46d6a93 View commit details
  9. Update checked-in dependencies

    github-actions[bot] committed May 11, 2022
    Copy the full SHA
    ec7fba1 View commit details
  10. Merge pull request #1071 from github/update-v1.1.10-2f58583a

    Merge releases/v2 into releases/v1
    henrymercer authored May 11, 2022
    Copy the full SHA
    5e59d8e View commit details
Showing with 813 additions and 460 deletions.
  1. +1 −1 .github/update-release-branch.py
  2. +24 −6 .github/workflows/__packaging-config-inputs-js.yml
  3. +23 −5 .github/workflows/__packaging-config-js.yml
  4. +24 −6 .github/workflows/__packaging-inputs-js.yml
  5. +14 −6 .github/workflows/__split-workflow.yml
  6. +35 −0 .github/workflows/script/update-required-checks.sh
  7. +5 −0 CHANGELOG.md
  8. +6 −5 CONTRIBUTING.md
  9. +1 −2 lib/actions-util.js
  10. +1 −1 lib/actions-util.js.map
  11. +7 −3 lib/analyze-action-env.test.js
  12. +1 −1 lib/analyze-action-env.test.js.map
  13. +7 −3 lib/analyze-action-input.test.js
  14. +1 −1 lib/analyze-action-input.test.js.map
  15. +6 −1 lib/analyze-action.js
  16. +1 −1 lib/analyze-action.js.map
  17. +13 −11 lib/analyze.js
  18. +1 −1 lib/analyze.js.map
  19. +2 −35 lib/analyze.test.js
  20. +1 −1 lib/analyze.test.js.map
  21. +2 −1 lib/autobuild-action.js
  22. +1 −1 lib/autobuild-action.js.map
  23. +2 −4 lib/codeql.js
  24. +1 −1 lib/codeql.js.map
  25. +63 −16 lib/config-utils.js
  26. +1 −1 lib/config-utils.js.map
  27. +51 −61 lib/config-utils.test.js
  28. +1 −1 lib/config-utils.test.js.map
  29. +1 −1 lib/defaults.json
  30. +1 −0 lib/init-action.js
  31. +1 −1 lib/init-action.js.map
  32. +15 −14 lib/upload-lib.js
  33. +1 −1 lib/upload-lib.js.map
  34. +7 −2 lib/upload-sarif-action.js
  35. +1 −1 lib/upload-sarif-action.js.map
  36. +45 −5 lib/util.js
  37. +1 −1 lib/util.js.map
  38. +54 −19 lib/util.test.js
  39. +1 −1 lib/util.test.js.map
  40. +1 −1 node_modules/.package-lock.json
  41. +2 −2 package-lock.json
  42. +1 −1 package.json
  43. +5 −6 pr-checks/checks/packaging-config-inputs-js.yml
  44. +4 −5 pr-checks/checks/packaging-config-js.yml
  45. +5 −6 pr-checks/checks/packaging-inputs-js.yml
  46. +5 −5 pr-checks/checks/split-workflow.yml
  47. +2 −2 src/actions-util.ts
  48. +7 −3 src/analyze-action-env.test.ts
  49. +7 −3 src/analyze-action-input.test.ts
  50. +5 −1 src/analyze-action.ts
  51. +2 −35 src/analyze.test.ts
  52. +31 −19 src/analyze.ts
  53. +3 −2 src/autobuild-action.ts
  54. +5 −7 src/codeql.ts
  55. +59 −62 src/config-utils.test.ts
  56. +81 −28 src/config-utils.ts
  57. +1 −1 src/defaults.json
  58. +2 −0 src/init-action.ts
  59. +17 −14 src/upload-lib.ts
  60. +14 −3 src/upload-sarif-action.ts
  61. +69 −21 src/util.test.ts
  62. +55 −8 src/util.ts
  63. +4 −2 tests/multi-language-repo/.github/codeql/codeql-config-packaging.yml
  64. +2 −1 tests/multi-language-repo/.github/codeql/codeql-config-packaging3.yml
2 changes: 1 addition & 1 deletion .github/update-release-branch.py
Original file line number Diff line number Diff line change
@@ -292,7 +292,7 @@ def main():
conflicted_files = run_git('diff', '--name-only', '--diff-filter', 'U').splitlines()
if len(conflicted_files) > 0:
run_git('add', '.')
run_git('commit', '--no-edit')
run_git('commit', '--no-edit')

# Migrate the package version number from a v2 version number to a v1 version number
print(f'Setting version number to {version}')
30 changes: 24 additions & 6 deletions .github/workflows/__packaging-config-inputs-js.yml

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

28 changes: 23 additions & 5 deletions .github/workflows/__packaging-config-js.yml

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

30 changes: 24 additions & 6 deletions .github/workflows/__packaging-inputs-js.yml

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

20 changes: 14 additions & 6 deletions .github/workflows/__split-workflow.yml

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

35 changes: 35 additions & 0 deletions .github/workflows/script/update-required-checks.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#!/usr/bin/env bash
# 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`."
exit 1
fi

if [ "$#" -eq 1 ]; then
# If we were passed an argument, pass it as a query to fzf
GITHUB_SHA="$@"
elif [ "$#" -gt 1 ]; then
echo "Usage: $0 [SHA]"
echo "Update the required checks based on the SHA, or main."
elif [ -z "$GITHUB_SHA" ]; then
# If we don't have a SHA, use main
GITHUB_SHA="$(git rev-parse main)"
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") | not)] | sort')"

echo "$CHECKS" | jq

echo "{\"contexts\": ${CHECKS}}" > checks.json

for BRANCH in main releases/v2 releases/v1; do
echo "Updating $BRANCH"
gh api --silent -X "PATCH" "repos/github/codeql-action/branches/$BRANCH/protection/required_status_checks" --input checks.json
done

rm checks.json
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

## 1.1.10 - 10 May 2022

- Update default CodeQL bundle version to 2.9.5. [#1056](https://github.com/github/codeql-action/pull/1056)
- When `wait-for-processing` is enabled, the workflow will now fail if there were any errors that occurred during processing of the analysis results.

## 1.1.9 - 27 Apr 2022

- Add `working-directory` input to the `autobuild` action. [#1024](https://github.com/github/codeql-action/pull/1024)
11 changes: 6 additions & 5 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -80,22 +80,23 @@ Here are a few things you can do that will increase the likelihood of your pull

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

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.
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](.github/workflows/update-required-checks.yml) workflow.

To regenerate the PR jobs for the action:
Or you can use this semi-automated approach:

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`):
1. In a terminal check out the `SHA` whose checks you want to use as the base. Typically, this will be `main`.
2. From a terminal, run the following commands:

```sh
SHA= ####
SHA="$(git rev-parse HEAD)"
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)]')"
echo "{\"contexts\": ${CHECKS}}" > checks.json
gh api -X "PATCH" repos/github/codeql-action/branches/main/protection/required_status_checks --input checks.json
gh api -X "PATCH" repos/github/codeql-action/branches/releases/v2/protection/required_status_checks --input checks.json
gh api -X "PATCH" repos/github/codeql-action/branches/releases/v1/protection/required_status_checks --input checks.json
````

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.
3. Go to the [branch protection rules settings page](https://github.com/github/codeql-action/settings/branches) and validate that the rules have been updated.

## Resources

3 changes: 1 addition & 2 deletions lib/actions-util.js

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

Loading