Skip to content

Commit 3f41e06

Browse files
committed
Merge remote-tracking branch 'upstream/main' into aeisenberg/enable-kotlin-tests
2 parents 72f5fb9 + bd2ebac commit 3f41e06

File tree

964 files changed

+67177
-77357
lines changed

Some content is hidden

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

964 files changed

+67177
-77357
lines changed

.eslintrc.json

+2-8
Original file line numberDiff line numberDiff line change
@@ -41,29 +41,23 @@
4141
"ignoreTemplateLiterals": true
4242
}],
4343
"no-async-foreach/no-async-foreach": "error",
44-
"no-console": "off",
4544
"no-sequences": "error",
4645
"no-shadow": "off",
47-
"@typescript-eslint/no-shadow": ["error"],
46+
"@typescript-eslint/no-shadow": "error",
4847
"one-var": ["error", "never"]
4948
},
5049
"overrides": [{
5150
// "temporarily downgraded during transition to eslint
5251
"files": "**",
5352
"rules": {
54-
"@typescript-eslint/ban-types": "off",
55-
"@typescript-eslint/explicit-module-boundary-types": "off",
5653
"@typescript-eslint/no-explicit-any": "off",
5754
"@typescript-eslint/no-unsafe-assignment": "off",
58-
"@typescript-eslint/no-unsafe-call": "off",
5955
"@typescript-eslint/no-unsafe-member-access": "off",
60-
"@typescript-eslint/no-unsafe-return": "off",
6156
"@typescript-eslint/no-var-requires": "off",
6257
"@typescript-eslint/prefer-regexp-exec": "off",
6358
"@typescript-eslint/require-await": "off",
6459
"@typescript-eslint/restrict-template-expressions": "off",
65-
"func-style": "off",
66-
"sort-imports": "off"
60+
"func-style": "off"
6761
}
6862
}],
6963
"settings": {

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

+10-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,16 @@ inputs:
2929
tools:
3030
required: true
3131
description: |
32-
The url of codeql to use.
32+
The version of CodeQL passed to the `tools` input of the init action.
33+
This can be any of the following:
34+
35+
- A local path to a tarball containing the CodeQL tools, or
36+
- A URL to a GitHub release assets containing the CodeQL tools, or
37+
- A special value `linked` which is forcing the use of the CodeQL tools
38+
that the action has been bundled with.
39+
40+
If not specified, the Action will check in several places until it finds
41+
the CodeQL tools.
3342
3443
runs:
3544
using: composite

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

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: "Prepare test"
22
description: Performs some preparation to run tests
33
inputs:
44
version:
5-
description: "The version of the CodeQL CLI to use. Can be 'latest', 'default', 'nightly-latest', 'nightly-YYYY-MM-DD', or 'stable-YYYY-MM-DD'."
5+
description: "The version of the CodeQL CLI to use. Can be 'linked', 'default', 'nightly-latest', 'nightly-YYYY-MM-DD', or 'stable-YYYY-MM-DD'."
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"
@@ -54,8 +54,8 @@ runs:
5454
elif [[ ${{ inputs.version }} == *"stable"* ]]; then
5555
version=`echo ${{ inputs.version }} | sed -e 's/^.*\-//'`
5656
echo "tools-url=https://github.com/github/codeql-action/releases/download/codeql-bundle-$version/$artifact_name" >> $GITHUB_OUTPUT
57-
elif [[ ${{ inputs.version }} == "latest" ]]; then
58-
echo "tools-url=latest" >> $GITHUB_OUTPUT
57+
elif [[ ${{ inputs.version }} == "linked" ]]; then
58+
echo "tools-url=linked" >> $GITHUB_OUTPUT
5959
elif [[ ${{ inputs.version }} == "default" ]]; then
6060
echo "tools-url=" >> $GITHUB_OUTPUT
6161
else

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

+10-2
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,16 @@ inputs:
2323
tools:
2424
required: true
2525
description: |
26-
The url of codeql to use.
26+
The version of CodeQL passed to the `tools` input of the init action.
27+
This can be any of the following:
28+
29+
- A local path to a tarball containing the CodeQL tools, or
30+
- A URL to a GitHub release assets containing the CodeQL tools, or
31+
- A special value `linked` which is forcing the use of the CodeQL tools
32+
that the action has been bundled with.
33+
34+
If not specified, the Action will check in several places until it finds
35+
the CodeQL tools.
2736
2837
runs:
2938
using: composite
@@ -39,7 +48,6 @@ runs:
3948
- uses: ./../action/analyze
4049
with:
4150
output: ${{ runner.temp }}/results
42-
upload-database: false
4351
upload: never
4452
env:
4553
CODEQL_ACTION_TEST_MODE: "true"

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,12 @@ runs:
1818
- name: Set up Python
1919
uses: actions/setup-python@v5
2020
with:
21-
python-version: 3.8
21+
python-version: 3.12
2222

2323
- name: Install dependencies
2424
run: |
2525
python -m pip install --upgrade pip
26-
pip install PyGithub==1.55 requests
26+
pip install PyGithub==2.3.0 requests
2727
shell: bash
2828

2929
- name: Update git config

.github/actions/setup-swift/action.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ runs:
3333
fi
3434
echo "version=$VERSION" | tee -a $GITHUB_OUTPUT
3535
36-
- uses: swift-actions/setup-swift@e1dca7c4a36344146bbc2803f0d538462477bb37 # Please update the corresponding SHA in the CLI's CodeQL Action Integration Test.
36+
- uses: redsun82/setup-swift@b2b6f77ab14f6a9b136b520dc53ec8eca27d2b99 # Please update the corresponding SHA in the CLI's CodeQL Action Integration Test.
3737
if: runner.os == 'Linux' && steps.get_swift_version.outputs.version != 'null'
3838
with:
3939
swift-version: "${{ steps.get_swift_version.outputs.version }}"

.github/update-release-branch.py

+22-7
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import argparse
22
import datetime
3+
import fileinput
34
import re
45
from github import Github
56
import json
@@ -171,6 +172,19 @@ def get_current_version():
171172
with open('package.json', 'r') as f:
172173
return json.load(f)['version']
173174

175+
# `npm version` doesn't always work because of merge conflicts, so we
176+
# replace the version in package.json textually.
177+
def replace_version_package_json(prev_version, new_version):
178+
prev_line_is_codeql = False
179+
for line in fileinput.input('package.json', inplace = True, encoding='utf-8'):
180+
if prev_line_is_codeql and f'\"version\": \"{prev_version}\"' in line:
181+
print(line.replace(prev_version, new_version), end='')
182+
else:
183+
prev_line_is_codeql = False
184+
print(line, end='')
185+
if '\"name\": \"codeql\",' in line:
186+
prev_line_is_codeql = True
187+
174188
def get_today_string():
175189
today = datetime.datetime.today()
176190
return '{:%d %b %Y}'.format(today)
@@ -186,16 +200,17 @@ def process_changelog_for_backports(source_branch_major_version, target_branch_m
186200
with open('CHANGELOG.md', 'r') as f:
187201

188202
# until we find the first section, just duplicate all lines
189-
while True:
203+
found_first_section = False
204+
while not found_first_section:
190205
line = f.readline()
191206
if not line:
192207
raise Exception('Could not find any change sections in CHANGELOG.md') # EOF
193208

194-
output += line
195209
if line.startswith('## '):
196210
line = line.replace(f'## {source_branch_major_version}', f'## {target_branch_major_version}')
197-
# we have found the first section, so now handle things differently
198-
break
211+
found_first_section = True
212+
213+
output += line
199214

200215
# found_content tracks whether we hit two headings in a row
201216
found_content = False
@@ -373,9 +388,9 @@ def main():
373388
run_git('commit', '--no-edit')
374389

375390
# Migrate the package version number from a vLatest version number to a vOlder version number
376-
print(f'Setting version number to {version}')
377-
subprocess.check_output(['npm', 'version', version, '--no-git-tag-version'])
378-
run_git('add', 'package.json', 'package-lock.json')
391+
print(f'Setting version number to {version} in package.json')
392+
replace_version_package_json(get_current_version(), version) # We rely on the `Update dependencies` workflow to update package-lock.json
393+
run_git('add', 'package.json')
379394

380395
# Migrate the changelog notes from vLatest version numbers to vOlder version numbers
381396
print(f'Migrating changelog notes from v{source_branch_major_version} to v{target_branch_major_version}')

.github/workflows/__all-platform-bundle.yml

+40-45
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)