Skip to content

Commit 299edd7

Browse files
authored
Merge branch 'main' into main
2 parents 224dc51 + 3ea37a4 commit 299edd7

281 files changed

Lines changed: 83342 additions & 44445 deletions

File tree

Some content is hidden

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

‎.editorconfig‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,6 @@ trim_trailing_whitespace = true
88
[*.ts]
99
indent_style = space
1010
indent_size = 2
11+
12+
[*.{yml,yaml}]
13+
indent_size = 2

‎.github/ISSUE_TEMPLATE/config.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ blank_issues_enabled: true
22
contact_links:
33
- name: Contact GitHub Support
44
url: https://support.github.com/request
5-
about: Contact Support
5+
about: Contact Support

‎.github/actions/check-codescanning-config/action.yml‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: Check Code-Scanning Config
22
description: |
3-
Checks the code scanning configuration file generated by the
4-
action to ensure it contains the expected contents
3+
Checks the code scanning configuration file generated by the
4+
action to ensure it contains the expected contents
55
inputs:
66
languages:
77
required: false
@@ -52,7 +52,7 @@ runs:
5252
tools: ${{ inputs.tools }}
5353
db-location: ${{ runner.temp }}/codescanning-config-cli-test
5454
env:
55-
CODEQL_ACTION_TEST_MODE: 'true'
55+
CODEQL_ACTION_TEST_MODE: "true"
5656

5757
- name: Install dependencies
5858
shell: bash
@@ -62,7 +62,7 @@ runs:
6262
working-directory: ${{ github.action_path }}
6363
shell: bash
6464
env:
65-
EXPECTED_CONFIG_FILE_CONTENTS: '${{ inputs.expected-config-file-contents }}'
65+
EXPECTED_CONFIG_FILE_CONTENTS: "${{ inputs.expected-config-file-contents }}"
6666
run: ts-node ./index.ts "$RUNNER_TEMP/user-config.yaml" "$EXPECTED_CONFIG_FILE_CONTENTS"
6767
- name: Clean up
6868
shell: bash
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: "Post comment"
2+
description: "Create or update a sticky PR comment identified by a caller-provided marker."
3+
inputs:
4+
marker:
5+
description: >
6+
Non-empty plain-text identifier for the comment. Use a unique, stable value
7+
for each distinct comment; it is automatically wrapped in a hidden HTML comment.
8+
required: true
9+
body:
10+
description: "Full comment markdown."
11+
required: true
12+
update-only:
13+
description: Do nothing if no comment with the specified marker exists.
14+
required: false
15+
default: "false"
16+
issue-id:
17+
description: >
18+
The issue or pull request number to post/update the comment on.
19+
Defaults to the current pull request if not provided.
20+
required: false
21+
token:
22+
description: "The GitHub token to authenticate with."
23+
required: true
24+
runs:
25+
using: composite
26+
steps:
27+
- name: Post comment
28+
shell: bash
29+
env:
30+
BODY: ${{ inputs.body }}
31+
MARKER: ${{ inputs.marker }}
32+
UPDATE_ONLY: ${{ case(inputs.update-only == 'true', '--update-only', '') }}
33+
GH_TOKEN: ${{ inputs.token }}
34+
ISSUE_ID: ${{ inputs.issue-id || github.event.pull_request.number }}
35+
run: |
36+
npx tsx ./pr-checks/post-comment.ts \
37+
--body "$BODY" \
38+
--marker "$MARKER" \
39+
$UPDATE_ONLY \
40+
--issue-id "$ISSUE_ID" \
41+
--repository "$GITHUB_REPOSITORY"

‎.github/actions/prepare-mergeback-branch/action.yml‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,7 @@ runs:
9292
Please do the following:
9393
9494
- [ ] Approve running the full set of PR checks.
95-
- [ ] Approve and merge the PR. When merging the PR, make sure "Create a merge commit" is
96-
selected rather than "Squash and merge" or "Rebase and merge".
95+
- [ ] Approve and merge the PR. When merging the PR, make sure "Create a merge commit" is selected rather than "Squash and merge" or "Rebase and merge".
9796
EOF
9897
)
9998

‎.github/actions/prepare-test/action.yml‎

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ inputs:
66
required: true
77
use-all-platform-bundle:
88
description: "If true, we output a tools URL with codeql-bundle.tar.gz file rather than platform-specific URL"
9-
default: 'false'
9+
default: "false"
1010
required: false
1111
setup-kotlin:
1212
description: "If true, we setup kotlin"
13-
default: 'true'
13+
default: "true"
1414
required: true
1515
outputs:
1616
tools-url:
@@ -36,7 +36,14 @@ runs:
3636
set -e # Fail this Action if `gh release list` fails.
3737
3838
if [[ "$VERSION" == "nightly" || "$VERSION" == "nightly-latest" ]]; then
39-
echo "tools-url=nightly" >> "$GITHUB_OUTPUT"
39+
if [[ "$USE_ALL_PLATFORM_BUNDLE" == "true" ]]; then
40+
# With `tools: nightly`, the Action downloads the bundle for the runner's platform, so look
41+
# up the latest nightly release here to get its all-platform bundle instead.
42+
tag=$(gh release list --repo dsp-testing/codeql-cli-nightlies --limit 1 --json tagName --jq '.[0].tagName')
43+
echo "tools-url=https://github.com/dsp-testing/codeql-cli-nightlies/releases/download/$tag/codeql-bundle.tar.gz" >> "$GITHUB_OUTPUT"
44+
else
45+
echo "tools-url=nightly" >> "$GITHUB_OUTPUT"
46+
fi
4047
exit 0
4148
elif [[ "$VERSION" == "linked" ]]; then
4249
echo "tools-url=linked" >> "$GITHUB_OUTPUT"
@@ -73,7 +80,10 @@ runs:
7380
exit 1
7481
fi
7582
76-
- uses: fwilhe2/setup-kotlin@9c245a6425255f5e98ba1ce6c15d31fce7eca9da
83+
- uses: fwilhe2/setup-kotlin@b325539ca8f6e1d9ee04efed06f49bdbf5426dbb # v2.1
7784
if: ${{ inputs.setup-kotlin == 'true' }}
7885
with:
79-
version: 1.8.21
86+
# Kotlin is installed on the runners by default, but the version that is pre-installed is too new
87+
# to be supported by CodeQL. This Kotlin version is selected to be compatible with both the default Java
88+
# version on the `ubuntu-latest` runners and CodeQL.
89+
version: 2.1.20

‎.github/actions/query-filter-test/action.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ runs:
5454
- name: Check SARIF
5555
uses: ./../action/.github/actions/check-sarif
5656
with:
57-
sarif-file: ${{ inputs.sarif-file }}
57+
sarif-file: ${{ inputs.sarif-file }}
5858
queries-run: ${{ inputs.queries-run}}
5959
queries-not-run: ${{ inputs.queries-not-run}}
6060
- name: Cleanup after test

‎.github/actions/release-branches/action.yml‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
name: 'Release branches'
2-
description: 'Determine branches for release & backport'
1+
name: "Release branches"
2+
description: "Determine branches for release & backport"
33
inputs:
44
major_version:
5-
description: 'The version as extracted from the package.json file'
5+
description: "The version as extracted from the package.json file"
66
required: true
77
latest_tag:
8-
description: 'The most recent tag published to the repository'
8+
description: "The most recent tag published to the repository"
99
required: true
1010
outputs:
1111
backport_source_branch:

‎.github/actions/release-initialise/action.yml‎

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,24 @@
1-
name: 'Prepare release job'
2-
description: 'Prepare for updating a release branch'
1+
name: "Prepare release job"
2+
description: "Prepare for updating a release branch"
33

44
runs:
55
using: "composite"
66
steps:
7-
87
- name: Dump environment
98
run: env
109
shell: bash
1110

1211
- name: Dump GitHub context
1312
env:
14-
GITHUB_CONTEXT: '${{ toJson(github) }}'
13+
GITHUB_CONTEXT: "${{ toJson(github) }}"
1514
run: echo "$GITHUB_CONTEXT"
1615
shell: bash
1716

1817
- name: Set up Node
19-
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
18+
uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
2019
with:
2120
node-version: 24
22-
cache: 'npm'
21+
cache: "npm"
2322

2423
- name: Install JavaScript dependencies
2524
shell: bash

‎.github/copilot-instructions.md‎

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,12 @@ The CodeQL Action is used in GitHub Actions workflows to run CodeQL scans using
1111

1212
## Review instructions
1313

14-
- When wording review comments, be helpful and friendly. Assume that the PR author has written the code with the best of intentions. Word your comments constructively as suggestions for improvements. Do not word suggestions as commands.
14+
- Prioritise identifying critical issues, such as logic bugs, over comments on documentation or typos.
15+
- When wording review comments, be helpful and friendly. Assume that the PR author has written the code with the best of intentions. Never word suggestions as commands or using the imperative. Examples of what you should never write: "Preserve that non-fatal behaviour here" or "Please preserve that non-fatal behaviour here".
16+
- When writing feedback, assume that the PR author is competent and is able to understand whether the point you are making is valid or not, why you are raising it, and how to best address it. While you can suggest how to address a point you are making, don't phrase it as a requirement or assume that it is the only solution.
17+
- Always word your comments constructively as suggestions for improvements, for example: "It would make sense to ..." or "Could you add ...?" or "Would it make sense to ...?"
1518
- If you want to comment on a change that you believe will fail a CI check, do not present the CI failure you expect as a fact. Instead, write that you think a change "may" lead to a failure in CI. Suggest that, if such a failure manifests, the changes you are commenting on may be the place responsible for the failure and are worth looking at.
16-
- If a suggestion you make is suitable for a follow-up, such as a refactoring that doesn't change the behaviour or fixing a typo in a comment, mention that it can be addressed in a later PR rather than blocking this one.
19+
- If a suggestion you make is suitable for a follow-up, such as a refactoring that doesn't change the behaviour or fixing a typo in a comment, mention that it can be addressed in a later PR rather than blocking this one or prefix your comment with "Minor: ".
1720
- If a change is a net improvement, for example because it improves on an existing limitation of existing code, do not complain about pre-existing problems that remain. You may comment on them, but you should make it clear that the thing you are commenting on is not new by writing e.g. "Not new in this PR, but [..]" followed by your description of the issue and a suggestion that it could be improved at the same time with e.g. "Consider whether this is worth addressing as part of this PR as well."
1821

1922
## Generated code
@@ -22,6 +25,16 @@ The main codebase of the CodeQL Action is written in TypeScript and compiled to
2225

2326
GitHub Actions workflows in the `.github/workflows` directory whose filenames start with two underscores (e.g. `__all-platform-bundle.yml`) are automatically generated using the `pr-checks/sync.sh` script from template files in the `pr-checks/checks` directory. Therefore, you do not need to review files in the `.github/workflows` directory that start with two underscores. However, you should review changes to the `pr-checks` directory as well as workflows in the `.github/workflows` directory that do not start with underscores.
2427

28+
## Feature flags
29+
30+
Some functionality in the code may be gated behind feature flags, which are controlled server-side. If the functionality that is gated behind them is user-facing, then this should be documented in a change note at the time that the gated functionality is added. See `CHANGELOG.md` for existing notes that mention "experimental" for examples. These typically include information about when users may expect to see the feature rolled out.
31+
32+
When a feature flag that gates some functionality is removed, this does not need to be documented in a change note since the feature is already rolled out and the notes for the release which introduced the feature already describe it. The only exception is functionality which will start having an effect on GHES as a result of the feature flag removal:
33+
34+
- Most functionality gated behind feature flags does not affect GHES.
35+
- We can make functionality available on GHES by setting `defaultValue` to `true` first and waiting for this to have had an effect on GHES. No change note is needed if a feature flag is removed where `defaultValue` was `true`.
36+
- When removing a feature flag where `defaultValue` was `false` and the functionality starts to affect GHES, a change note may be appropriate.
37+
2538
## Release process
2639

2740
Changes that are merged to the `main` branch are not used in production straight away. Instead, changes from `main` must first be released using the release process, which has to be manually triggered by a staff member. Therefore, it is possible for further changes to be made to the code after some changes have been merged to `main` but before they are released. Once the release process automation is started, a series of PRs are automatically generated:

0 commit comments

Comments
 (0)