Skip to content

Commit 7db47dd

Browse files
committed
Merge branch 'main' into henrymercer/repo-size-diff-check
2 parents 5a80681 + c8a3492 commit 7db47dd

30 files changed

Lines changed: 359 additions & 242 deletions

.github/update-release-branch.py

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,23 @@
1616
"""
1717

1818
# NB: This exact commit message is used to find commits for reverting during backports.
19-
# Changing it requires a transition period where both old and new versions are supported.
19+
# Changing it requires a transition period where both old and new versions are supported.
2020
BACKPORT_COMMIT_MESSAGE = 'Update version and changelog for v'
2121

2222
# Name of the remote
2323
ORIGIN = 'origin'
2424

25+
# Environment variables to check for a GitHub API token.
26+
TOKEN_ENVIRONMENT_VARIABLES = ('GH_TOKEN', 'GITHUB_TOKEN')
27+
28+
# Gets a GitHub API token from one of the supported environment variables.
29+
def get_github_token():
30+
for variable_name in TOKEN_ENVIRONMENT_VARIABLES:
31+
token = os.environ.get(variable_name, '').strip()
32+
if token:
33+
return token
34+
raise Exception('Missing GitHub token. Set GITHUB_TOKEN or GH_TOKEN.')
35+
2536
# Runs git with the given args and returns the stdout.
2637
# Raises an error if git does not exit successfully (unless passed
2738
# allow_non_zero_exit_code=True).
@@ -270,12 +281,6 @@ def update_changelog(version):
270281
def main():
271282
parser = argparse.ArgumentParser('update-release-branch.py')
272283

273-
parser.add_argument(
274-
'--github-token',
275-
type=str,
276-
required=True,
277-
help='GitHub token, typically from GitHub Actions.'
278-
)
279284
parser.add_argument(
280285
'--repository-nwo',
281286
type=str,
@@ -313,7 +318,7 @@ def main():
313318
target_branch = args.target_branch
314319
is_primary_release = args.is_primary_release
315320

316-
repo = Github(args.github_token).get_repo(args.repository_nwo)
321+
repo = Github(get_github_token()).get_repo(args.repository_nwo)
317322

318323
# the target branch will be of the form releases/vN, where N is the major version number
319324
target_branch_major_version = target_branch.strip('releases/v')

.github/workflows/__go-tracing-autobuilder.yml

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

.github/workflows/__go-tracing-custom-build-steps.yml

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

.github/workflows/__go-tracing-legacy-workflow.yml

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

.github/workflows/__multi-language-autodetect.yml

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

.github/workflows/__rust.yml

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

.github/workflows/update-release-branch.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,11 +64,12 @@ jobs:
6464
6565
- name: Update current release branch
6666
if: github.event_name == 'workflow_dispatch'
67+
env:
68+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6769
run: |
6870
echo SOURCE_BRANCH=${REF_NAME}
6971
echo TARGET_BRANCH=releases/${MAJOR_VERSION}
7072
python .github/update-release-branch.py \
71-
--github-token ${{ secrets.GITHUB_TOKEN }} \
7273
--repository-nwo ${{ github.repository }} \
7374
--source-branch '${{ env.REF_NAME }}' \
7475
--target-branch 'releases/${{ env.MAJOR_VERSION }}' \
@@ -107,11 +108,12 @@ jobs:
107108
- uses: ./.github/actions/release-initialise
108109

109110
- name: Update older release branch
111+
env:
112+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
110113
run: |
111114
echo SOURCE_BRANCH=${SOURCE_BRANCH}
112115
echo TARGET_BRANCH=${TARGET_BRANCH}
113116
python .github/update-release-branch.py \
114-
--github-token ${{ secrets.GITHUB_TOKEN }} \
115117
--repository-nwo ${{ github.repository }} \
116118
--source-branch ${SOURCE_BRANCH} \
117119
--target-branch ${TARGET_BRANCH} \

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ See the [releases page](https://github.com/github/codeql-action/releases) for th
44

55
## [UNRELEASED]
66

7-
No user facing changes.
7+
- _Breaking change_: Bump the minimum required CodeQL bundle version to 2.19.4. [#3894](https://github.com/github/codeql-action/pull/3894)
8+
- Add support for SHA-256 Git object IDs. [#3893](https://github.com/github/codeql-action/pull/3893)
89

910
## 4.35.5 - 15 May 2026
1011

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ Once the mergeback and backport pull request have been merged, the release is co
7171

7272
Since the `codeql-action` runs most of its testing through individual Actions workflows, there are over two hundred required jobs that need to pass in order for a PR to turn green. It would be too tedious to maintain that list manually. You can regenerate the set of required checks automatically by running the [sync-checks.ts](pr-checks/sync-checks.ts) script:
7373

74-
- At a minimum, you must provide an argument for the `--token` input. For example, `--token "$(gh auth token)"` to use the same token that `gh` uses. If no token is provided or the token has insufficient permissions, the script will fail.
74+
- At a minimum, you must provide a token with permissions to update branch protection rules. For example, `gh auth token | pr-checks/sync-checks.ts --token-stdin` uses the same token that `gh` uses. You can also set the `GH_TOKEN` or `GITHUB_TOKEN` environment variable. If no token is provided or the token has insufficient permissions, the script will fail.
7575
- By default, the script performs a dry run and outputs information about the changes it would make to the branch protection rules. To actually apply the changes, specify the `--apply` flag.
7676
- If you run the script without any other arguments, it will retrieve the set of workflows that ran for the latest commit on `main`.
7777
- You can specify a different git ref with the `--ref` input. You will likely want to use this if you have a PR that removes or adds PR checks. For example, `--ref "some/branch/name"` to use the HEAD of the `some/branch/name` branch.

README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,6 @@ We typically release new minor versions of the CodeQL Action and Bundle when a n
7878
| `v3.28.21` | `2.21.3` | Enterprise Server 3.18 | |
7979
| `v3.28.12` | `2.20.7` | Enterprise Server 3.17 | |
8080
| `v3.28.6` | `2.20.3` | Enterprise Server 3.16 | |
81-
| `v3.28.6` | `2.20.3` | Enterprise Server 3.15 | |
82-
| `v3.28.6` | `2.20.3` | Enterprise Server 3.14 | |
8381

8482
See the full list of GHES release and deprecation dates at [GitHub Enterprise Server releases](https://docs.github.com/en/enterprise-server/admin/all-releases#releases-of-github-enterprise-server).
8583

0 commit comments

Comments
 (0)