Skip to content

Commit b0e7041

Browse files
Merge pull request #704 from github/update-v1.0.12-01d17eaf
Merge main into v1
2 parents db7158f + 3254fa5 commit b0e7041

File tree

265 files changed

+10291
-5056
lines changed

Some content is hidden

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

265 files changed

+10291
-5056
lines changed

.eslintrc.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,14 @@
1414
],
1515
"rules": {
1616
"filenames/match-regex": ["error", "^[a-z0-9-]+(\\.test)?$"],
17+
"i18n-text/no-en": "off",
1718
"import/extensions": "error",
1819
"import/no-amd": "error",
1920
"import/no-commonjs": "error",
2021
"import/no-dynamic-require": "error",
21-
"import/no-extraneous-dependencies": ["error"],
22+
// Disable the rule that checks that devDependencies aren't imported since we use a single
23+
// linting configuration file for both source and test code.
24+
"import/no-extraneous-dependencies": ["error", {"devDependencies": true}],
2225
"import/no-namespace": "off",
2326
"import/no-unresolved": "error",
2427
"import/no-webpack-loader-syntax": "error",
@@ -48,7 +51,8 @@
4851
"@typescript-eslint/prefer-regexp-exec": "off",
4952
"@typescript-eslint/require-await": "off",
5053
"@typescript-eslint/restrict-template-expressions": "off",
51-
"func-style": "off"
54+
"func-style": "off",
55+
"sort-imports": "off"
5256
}
5357
}]
5458
}

.github/workflows/codeql.yml

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@ jobs:
1717
versions: ${{ steps.compare.outputs.versions }}
1818

1919
permissions:
20-
actions: read
21-
contents: read
2220
security-events: write
2321

2422
steps:
@@ -48,13 +46,19 @@ jobs:
4846
CODEQL_VERSION_LATEST="$("$CODEQL_LATEST" version --format terse)"
4947
echo "Default CodeQL bundle version is $CODEQL_VERSION_DEFAULT"
5048
echo "Latest CodeQL bundle version is $CODEQL_VERSION_LATEST"
51-
if [[ "$CODEQL_VERSION_DEFAULT" == "$CODEQL_VERSION_LATEST" ]]; then
52-
# Just use `tools: null` to avoid duplication in the analysis job.
49+
50+
# If we're running on a pull request, run with both bundles, even if `tools: latest` would
51+
# be the same as `tools: null`. This allows us to make the job for each of the bundles a
52+
# required status check.
53+
#
54+
# If we're running on push, then we can skip running with `tools: latest` when it would be
55+
# the same as running with `tools: null`.
56+
if [[ "$GITHUB_EVENT_NAME" != "pull_request" && "$CODEQL_VERSION_DEFAULT" == "$CODEQL_VERSION_LATEST" ]]; then
5357
VERSIONS_JSON='[null]'
5458
else
55-
# Use both `tools: null` and `tools: latest` in the analysis job.
5659
VERSIONS_JSON='[null, "latest"]'
5760
fi
61+
5862
# Output a JSON-encoded list with the distinct versions to test against.
5963
echo "Suggested matrix config for analysis job: $VERSIONS_JSON"
6064
echo "::set-output name=versions::${VERSIONS_JSON}"
@@ -68,8 +72,6 @@ jobs:
6872
runs-on: ${{ matrix.os }}
6973

7074
permissions:
71-
actions: read
72-
contents: read
7375
security-events: write
7476

7577
steps:

.github/workflows/pr-checks.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -350,13 +350,19 @@ jobs:
350350
echo "Default CodeQL bundle version is $CODEQL_VERSION_DEFAULT"
351351
echo "Latest CodeQL bundle version is $CODEQL_VERSION_LATEST"
352352
echo "Nightly CodeQL bundle version is $CODEQL_VERSION_NIGHTLY"
353-
if [[ "$CODEQL_VERSION_DEFAULT" == "$CODEQL_VERSION_LATEST" ]]; then
354-
# Skip `tools: latest` since it would be the same as `tools: null`
353+
354+
# If we're running on a pull request, run each integration test with all three bundles, even
355+
# if `tools: latest` would be the same as `tools: null`. This allows us to make the
356+
# integration test job for each of the three bundles a required status check.
357+
#
358+
# If we're running on push, then we can skip running with `tools: latest` when it would be
359+
# the same as running with `tools: null`.
360+
if [[ "$GITHUB_EVENT_NAME" != "pull_request" && "$CODEQL_VERSION_DEFAULT" == "$CODEQL_VERSION_LATEST" ]]; then
355361
VERSIONS_JSON="[null, \"$NIGHTLY_URL\"]"
356362
else
357-
# Run integration tests with all three bundles.
358363
VERSIONS_JSON="[null, \"$NIGHTLY_URL\", \"latest\"]"
359364
fi
365+
360366
# Output a JSON-encoded list with the distinct versions to test against.
361367
echo "Suggested matrix config for integration tests: $VERSIONS_JSON"
362368
echo "::set-output name=versions::${VERSIONS_JSON}"

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# CodeQL Action and CodeQL Runner Changelog
22

3+
## 1.0.12 - 16 Aug 2021
4+
5+
- Update README to include a sample permissions block. [#689](https://github.com/github/codeql-action/pull/689)
6+
37
## 1.0.11 - 09 Aug 2021
48

59
- Update default CodeQL bundle version to 2.5.9. [#687](https://github.com/github/codeql-action/pull/687)

CONTRIBUTING.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,20 @@ Here are a few things you can do that will increase the likelihood of your pull
5858
- Keep your change as focused as possible. If there are multiple changes you would like to make that are not dependent upon each other, consider submitting them as separate pull requests.
5959
- Write a [good commit message](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html).
6060

61+
## Releasing (write access required)
62+
63+
1. The first step of releasing a new version of the `codeql-action` is running the "Update release branch" workflow.
64+
This workflow goes through the pull requests that have been merged to `main` since the last release, creates a changelog, then opens a pull request to merge the changes since the last release into the `v1` release branch.
65+
66+
A release is automatically started every Monday via a scheduled run of this workflow, however you can start a release manually by triggering a run via [workflow dispatch](https://github.com/github/codeql-action/actions/workflows/update-release-branch.yml).
67+
1. The workflow run will open a pull request titled "Merge main into v1". Mark the pull request as [ready for review](https://docs.github.com/en/github/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/changing-the-stage-of-a-pull-request#marking-a-pull-request-as-ready-for-review) to trigger the PR checks.
68+
1. Review the checklist items in the pull request description.
69+
Once you've checked off all but the last of these, approve the PR and automerge it.
70+
1. When the "Merge main into v1" pull request is merged into the `v1` branch, the "Tag release and merge back" workflow will create a mergeback PR.
71+
This mergeback incorporates the changelog updates into `main`, tags the release using the merge commit of the "Merge main into v1" pull request, and bumps the patch version of the CodeQL Action.
72+
73+
Approve the mergeback PR and automerge it. Once the mergeback has been merged into main, the release is complete.
74+
6175
## Resources
6276

6377
- [How to Contribute to Open Source](https://opensource.guide/how-to-contribute/)

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,14 @@ jobs:
4242
# CodeQL runs on ubuntu-latest, windows-latest, and macos-latest
4343
runs-on: ubuntu-latest
4444

45+
permissions:
46+
# required for all workflows
47+
security-events: write
48+
49+
# only required for workflows in private repositories
50+
actions: read
51+
contents: read
52+
4553
steps:
4654
- name: Checkout repository
4755
uses: actions/checkout@v2

lib/actions-util.test.js

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/actions-util.test.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/analyze-action.js

Lines changed: 3 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/analyze-action.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)