From d50cb700e314881ce593afdef51336f36ce90247 Mon Sep 17 00:00:00 2001 From: "Michael B. Gale" Date: Fri, 13 Mar 2026 12:50:06 +0000 Subject: [PATCH 01/22] Convert `release-branches.py` to TypeScript --- package-lock.json | 1 + pr-checks/config.ts | 2 + pr-checks/package.json | 1 + pr-checks/release-branches.ts | 71 +++++++++++++++++++++++++++++++++++ 4 files changed, 75 insertions(+) create mode 100644 pr-checks/config.ts create mode 100755 pr-checks/release-branches.ts diff --git a/package-lock.json b/package-lock.json index 0dc89792b5..af65dcb318 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9901,6 +9901,7 @@ "yaml": "^2.8.2" }, "devDependencies": { + "@actions/core": "*", "@types/node": "^20.19.9", "tsx": "^4.21.0", "typescript": "^5.9.3" diff --git a/pr-checks/config.ts b/pr-checks/config.ts new file mode 100644 index 0000000000..73001f13d5 --- /dev/null +++ b/pr-checks/config.ts @@ -0,0 +1,2 @@ +/** The oldest supported major version of the CodeQL Action. */ +export const OLDEST_SUPPORTED_MAJOR_VERSION = 3; diff --git a/pr-checks/package.json b/pr-checks/package.json index b323b98b83..7ec2fdc0fa 100644 --- a/pr-checks/package.json +++ b/pr-checks/package.json @@ -5,6 +5,7 @@ "yaml": "^2.8.2" }, "devDependencies": { + "@actions/core": "*", "@types/node": "^20.19.9", "tsx": "^4.21.0", "typescript": "^5.9.3" diff --git a/pr-checks/release-branches.ts b/pr-checks/release-branches.ts new file mode 100755 index 0000000000..03f5e5bc6d --- /dev/null +++ b/pr-checks/release-branches.ts @@ -0,0 +1,71 @@ +#!/usr/bin/env npx tsx + +import { parseArgs } from "node:util"; + +import * as core from "@actions/core"; + +import { OLDEST_SUPPORTED_MAJOR_VERSION } from "./config"; + +async function main() { + const { values: options } = parseArgs({ + options: { + // The major version of the release + "major-version": { + type: "string", + }, + // The most recent tag published to the repository + "latest-tag": { + type: "string", + }, + }, + strict: true, + }); + + if (options["major-version"] === undefined) { + throw Error("--major-version is required"); + } + if (options["latest-tag"] === undefined) { + throw Error("--latest-tag is required"); + } + + const majorVersion = Number.parseInt(options["major-version"].substring(1)); + const latestTag = options["latest-tag"]; + + console.log(`major_version: v${majorVersion}`); + console.log(`latest_tag: ${latestTag}`); + + // If this is a primary release, we backport to all supported branches, + // so we check whether the major_version taken from the package.json + // is greater than or equal to the latest tag pulled from the repo. + // For example... + // 'v1' >= 'v2' is False # we're operating from an older release branch and should not backport + // 'v2' >= 'v2' is True # the normal case where we're updating the current version + // 'v3' >= 'v2' is True # in this case we are making the first release of a new major version + const latestTagMajor = Number.parseInt(latestTag.split(".")[0].substring(1)); + const considerBackports = majorVersion >= latestTagMajor; + + core.setOutput("backport_source_branch", `releases/v${majorVersion}`); + + const backportTargetBranches: string[] = []; + + if (considerBackports) { + for (let i = latestTagMajor - 1; i > 0; i--) { + const branch_name = `releases/v${i}`; + if (i >= OLDEST_SUPPORTED_MAJOR_VERSION) { + backportTargetBranches.push(branch_name); + } + } + } + + core.setOutput( + "backport_target_branches", + JSON.stringify(backportTargetBranches), + ); + + process.exit(0); +} + +// Only call `main` if this script was run directly. +if (require.main === module) { + void main(); +} From f7da902f78636ea2aa0339a003618adec02dfc60 Mon Sep 17 00:00:00 2001 From: "Michael B. Gale" Date: Fri, 13 Mar 2026 13:07:45 +0000 Subject: [PATCH 02/22] Install `node` in `release-initialise` action --- .github/actions/release-initialise/action.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/actions/release-initialise/action.yml b/.github/actions/release-initialise/action.yml index c21772b149..2ff616ce4c 100644 --- a/.github/actions/release-initialise/action.yml +++ b/.github/actions/release-initialise/action.yml @@ -15,6 +15,12 @@ runs: run: echo "$GITHUB_CONTEXT" shell: bash + - name: Set up Node + uses: actions/setup-node@v6 + with: + node-version: 20 + cache: 'npm' + - name: Set up Python uses: actions/setup-python@v6 with: From 5abdb52ddd90ec994329e21cde5558a8fec67213 Mon Sep 17 00:00:00 2001 From: "Michael B. Gale" Date: Fri, 13 Mar 2026 13:08:13 +0000 Subject: [PATCH 03/22] Replace `release-branches.py` with TS version in `release-branches` action --- .github/actions/release-branches/action.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/actions/release-branches/action.yml b/.github/actions/release-branches/action.yml index 1807c0a3c0..26be726205 100644 --- a/.github/actions/release-branches/action.yml +++ b/.github/actions/release-branches/action.yml @@ -22,7 +22,8 @@ runs: MAJOR_VERSION: ${{ inputs.major_version }} LATEST_TAG: ${{ inputs.latest_tag }} run: | - python ${{ github.action_path }}/release-branches.py \ + npm ci + npx tsx ./pr-checks/release-branches.ts \ --major-version "$MAJOR_VERSION" \ --latest-tag "$LATEST_TAG" shell: bash From 250c858e5555660356a6f39812516c6f334f28ae Mon Sep 17 00:00:00 2001 From: "Michael B. Gale" Date: Fri, 13 Mar 2026 13:09:11 +0000 Subject: [PATCH 04/22] Refactor backport computation into `computeReleaseBranches` --- pr-checks/release-branches.ts | 87 ++++++++++++++++++++++++----------- 1 file changed, 61 insertions(+), 26 deletions(-) diff --git a/pr-checks/release-branches.ts b/pr-checks/release-branches.ts index 03f5e5bc6d..3efca40972 100755 --- a/pr-checks/release-branches.ts +++ b/pr-checks/release-branches.ts @@ -6,6 +6,57 @@ import * as core from "@actions/core"; import { OLDEST_SUPPORTED_MAJOR_VERSION } from "./config"; +/** The results of checking which release branches to backport to. */ +export interface BackportInfo { + /** The source release branch. */ + backportSourceBranch: string; + /** + * The computed release branches we should backport to. + * Will be empty if there are no branches we need to backport to. + */ + backportTargetBranches: string[]; +} + +/** + * Compute the backport source and target branches for a release. + * + * @param majorVersion - The major version string (e.g. "v4"). + * @param latestTag - The most recent tag published to the repository (e.g. "v4.32.6"). + * @param oldestSupportedMajorVersion - The oldest supported major version number. + * @returns The names of the source branch and target branches. + */ +export function computeBackportBranches( + majorVersion: string, + latestTag: string, + oldestSupportedMajorVersion: number, +): BackportInfo { + const majorVersionNumber = Number.parseInt(majorVersion.substring(1)); + const latestTagMajor = Number.parseInt(latestTag.split(".")[0].substring(1)); + + // If this is a primary release, we backport to all supported branches, + // so we check whether the majorVersion taken from the package.json + // is greater than or equal to the latest tag pulled from the repo. + // For example... + // 'v1' >= 'v2' is False # we're operating from an older release branch and should not backport + // 'v2' >= 'v2' is True # the normal case where we're updating the current version + // 'v3' >= 'v2' is True # in this case we are making the first release of a new major version + const considerBackports = majorVersionNumber >= latestTagMajor; + + const backportSourceBranch = `releases/v${majorVersionNumber}`; + const backportTargetBranches: string[] = []; + + if (considerBackports) { + for (let i = majorVersionNumber - 1; i > 0; i--) { + const branch_name = `releases/v${i}`; + if (i >= oldestSupportedMajorVersion) { + backportTargetBranches.push(branch_name); + } + } + } + + return { backportSourceBranch, backportTargetBranches }; +} + async function main() { const { values: options } = parseArgs({ options: { @@ -28,38 +79,22 @@ async function main() { throw Error("--latest-tag is required"); } - const majorVersion = Number.parseInt(options["major-version"].substring(1)); + const majorVersion = options["major-version"]; const latestTag = options["latest-tag"]; - console.log(`major_version: v${majorVersion}`); - console.log(`latest_tag: ${latestTag}`); - - // If this is a primary release, we backport to all supported branches, - // so we check whether the major_version taken from the package.json - // is greater than or equal to the latest tag pulled from the repo. - // For example... - // 'v1' >= 'v2' is False # we're operating from an older release branch and should not backport - // 'v2' >= 'v2' is True # the normal case where we're updating the current version - // 'v3' >= 'v2' is True # in this case we are making the first release of a new major version - const latestTagMajor = Number.parseInt(latestTag.split(".")[0].substring(1)); - const considerBackports = majorVersion >= latestTagMajor; - - core.setOutput("backport_source_branch", `releases/v${majorVersion}`); - - const backportTargetBranches: string[] = []; + console.log(`Major version: ${majorVersion}`); + console.log(`Latest tag: ${latestTag}`); - if (considerBackports) { - for (let i = latestTagMajor - 1; i > 0; i--) { - const branch_name = `releases/v${i}`; - if (i >= OLDEST_SUPPORTED_MAJOR_VERSION) { - backportTargetBranches.push(branch_name); - } - } - } + const result = computeBackportBranches( + majorVersion, + latestTag, + OLDEST_SUPPORTED_MAJOR_VERSION, + ); + core.setOutput("backport_source_branch", result.backportSourceBranch); core.setOutput( "backport_target_branches", - JSON.stringify(backportTargetBranches), + JSON.stringify(result.backportTargetBranches), ); process.exit(0); From 9780ea53fd8f3bbfc9240ff631dff6ab9eeb0203 Mon Sep 17 00:00:00 2001 From: "Michael B. Gale" Date: Fri, 13 Mar 2026 13:21:22 +0000 Subject: [PATCH 05/22] Validate inputs --- pr-checks/release-branches.ts | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/pr-checks/release-branches.ts b/pr-checks/release-branches.ts index 3efca40972..ceeaeefadb 100755 --- a/pr-checks/release-branches.ts +++ b/pr-checks/release-branches.ts @@ -30,8 +30,23 @@ export function computeBackportBranches( latestTag: string, oldestSupportedMajorVersion: number, ): BackportInfo { - const majorVersionNumber = Number.parseInt(majorVersion.substring(1)); - const latestTagMajor = Number.parseInt(latestTag.split(".")[0].substring(1)); + // Perform some sanity checks on the inputs. + // For `majorVersion`, we expect exactly `vN` for some `N`. + const majorVersionMatch = majorVersion.match(/^v(\d+)$/); + if (!majorVersionMatch) { + throw new Error("--major-version value must be in `vN` format."); + } + + // For latestTag, we expect something starting with `vN.M.P` + const latestTagMatch = latestTag.match(/^v(\d+)\.\d+\.\d+/); + if (!latestTagMatch) { + throw new Error( + `--latest-tag value must be in 'vN.M.P' format, but '${latestTag}' is not.`, + ); + } + + const majorVersionNumber = Number.parseInt(majorVersionMatch[1]); + const latestTagMajor = Number.parseInt(latestTagMatch[1]); // If this is a primary release, we backport to all supported branches, // so we check whether the majorVersion taken from the package.json @@ -60,11 +75,11 @@ export function computeBackportBranches( async function main() { const { values: options } = parseArgs({ options: { - // The major version of the release + // The major version of the release in `vN` format (e.g. `v4`). "major-version": { type: "string", }, - // The most recent tag published to the repository + // The most recent tag published to the repository (e.g. `v4.28.0`). "latest-tag": { type: "string", }, From cf2a9cbade012cbbd3aa062d5e8245cd29a09ba7 Mon Sep 17 00:00:00 2001 From: "Michael B. Gale" Date: Fri, 13 Mar 2026 13:25:15 +0000 Subject: [PATCH 06/22] Add tests for `release-branches.ts` --- pr-checks/release-branches.test.ts | 61 ++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 pr-checks/release-branches.test.ts diff --git a/pr-checks/release-branches.test.ts b/pr-checks/release-branches.test.ts new file mode 100644 index 0000000000..b33c7b85a7 --- /dev/null +++ b/pr-checks/release-branches.test.ts @@ -0,0 +1,61 @@ +#!/usr/bin/env npx tsx + +/* +Tests for the release-branches.ts script +*/ + +import * as assert from "node:assert/strict"; +import { describe, it } from "node:test"; + +import { computeBackportBranches } from "./release-branches"; + +describe("computeBackportBranches", async () => { + await it("rejects invalid major versions", () => { + // The majorVersion is expected to be in vN format. + assert.throws(() => computeBackportBranches("3", "v4.28.0", 3)); + assert.throws(() => computeBackportBranches("v3.1", "v4.28.0", 3)); + }); + + await it("rejects invalid latest tags", () => { + // The latestTag is expected to be in vN.M.P format. + assert.throws(() => computeBackportBranches("v3", "v4", 3)); + assert.throws(() => computeBackportBranches("v3", "4", 3)); + assert.throws(() => computeBackportBranches("v3", "v4.28", 3)); + assert.throws(() => computeBackportBranches("v3", "4.28", 3)); + assert.throws(() => computeBackportBranches("v3", "4.28.0", 3)); + }); + + await it("sets backport source branch based on major version", () => { + // Test that the backport source branch is releases/v{majorVersion} + const result = computeBackportBranches("v3", "v4.28.0", 3); + assert.equal(result.backportSourceBranch, "releases/v3"); + }); + + await it("no backport targets when major version is the oldest supported", () => { + // When majorVersion equals the major version of latestTag and we do not support older major versions, + // then there are no older supported branches to backport to. + const result = computeBackportBranches("v3", "v3.28.0", 3); + assert.deepEqual(result.backportTargetBranches, []); + }); + + await it("backports to older supported major versions", () => { + const result = computeBackportBranches("v4", "v4.1.0", 3); + assert.equal(result.backportSourceBranch, "releases/v4"); + assert.deepEqual(result.backportTargetBranches, ["releases/v3"]); + }); + + await it("backports to multiple older supported branches", () => { + const result = computeBackportBranches("v5", "v5.0.0", 3); + assert.equal(result.backportSourceBranch, "releases/v5"); + assert.deepEqual(result.backportTargetBranches, [ + "releases/v4", + "releases/v3", + ]); + }); + + await it("does not backport when major version is older than latest tag", () => { + const result = computeBackportBranches("v2", "v3.28.0", 2); + assert.equal(result.backportSourceBranch, "releases/v2"); + assert.deepEqual(result.backportTargetBranches, []); + }); +}); From b8eb533bea1168a2bcd77e55199e86b171140b51 Mon Sep 17 00:00:00 2001 From: "Michael B. Gale" Date: Fri, 13 Mar 2026 18:46:21 +0000 Subject: [PATCH 07/22] Add config file for excluded checks from `update-required-checks.sh` --- pr-checks/excluded.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 pr-checks/excluded.yml diff --git a/pr-checks/excluded.yml b/pr-checks/excluded.yml new file mode 100644 index 0000000000..104c1009eb --- /dev/null +++ b/pr-checks/excluded.yml @@ -0,0 +1,16 @@ +# PR checks to exclude from required checks +contains: + - "https://" + - "Update" + - "ESLint" + - "update" + - "test-setup-python-scripts" +is: + - "CodeQL" + - "Dependabot" + - "check-expected-release-files" + - "Agent" + - "Cleanup artifacts" + - "Prepare" + - "Upload results" + - "Label PR with size" From fbb8b97620a250991a13556e514a7a958cfd2df1 Mon Sep 17 00:00:00 2001 From: "Michael B. Gale" Date: Fri, 13 Mar 2026 18:47:45 +0000 Subject: [PATCH 08/22] Add initial TS implementation of `update-required-checks.sh` --- pr-checks/sync-checks.ts | 46 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100755 pr-checks/sync-checks.ts diff --git a/pr-checks/sync-checks.ts b/pr-checks/sync-checks.ts new file mode 100755 index 0000000000..f447ace022 --- /dev/null +++ b/pr-checks/sync-checks.ts @@ -0,0 +1,46 @@ +#!/usr/bin/env npx tsx + +/** Update the required checks based on the current branch. */ + +import { parseArgs } from "node:util"; + +import { OLDEST_SUPPORTED_MAJOR_VERSION } from "./config"; + +async function main(): Promise { + const { values: options } = parseArgs({ + options: { + // The token to use to authenticate to the API. + token: { + type: "string", + }, + // The git ref for which to retrieve the check runs. + ref: { + type: "string", + }, + // By default, we perform a dry-run. Setting `apply` to `true` actually applies the changes. + apply: { + type: "boolean", + default: false, + }, + }, + strict: true, + }); + + if (options.token === undefined) { + throw new Error("Missing --token"); + } + if (options.ref === undefined) { + throw new Error("Missing --ref"); + } + + console.info( + `Oldest supported major version is: ${OLDEST_SUPPORTED_MAJOR_VERSION}`, + ); + + process.exit(0); +} + +// Only call `main` if this script was run directly. +if (require.main === module) { + void main(); +} From 6e0a9b0b5ba7b4fae69a2b72cf08860d6bdc9031 Mon Sep 17 00:00:00 2001 From: "Michael B. Gale" Date: Fri, 13 Mar 2026 18:49:50 +0000 Subject: [PATCH 09/22] Initialise API client --- package-lock.json | 64 +++++++++++++++++++++------------------- pr-checks/package.json | 4 +++ pr-checks/sync-checks.ts | 17 +++++++++++ 3 files changed, 55 insertions(+), 30 deletions(-) diff --git a/package-lock.json b/package-lock.json index af65dcb318..0bc967c7e1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -411,36 +411,6 @@ "undici": "^6.23.0" } }, - "node_modules/@actions/github/node_modules/@octokit/plugin-paginate-rest": { - "version": "14.0.0", - "resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-14.0.0.tgz", - "integrity": "sha512-fNVRE7ufJiAA3XUrha2omTA39M6IXIc6GIZLvlbsm8QOQCYvpq/LkMNGyFlB1d8hTDzsAXa3OKtybdMAYsV/fw==", - "license": "MIT", - "dependencies": { - "@octokit/types": "^16.0.0" - }, - "engines": { - "node": ">= 20" - }, - "peerDependencies": { - "@octokit/core": ">=6" - } - }, - "node_modules/@actions/github/node_modules/@octokit/plugin-rest-endpoint-methods": { - "version": "17.0.0", - "resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-17.0.0.tgz", - "integrity": "sha512-B5yCyIlOJFPqUUeiD0cnBJwWJO8lkJs5d8+ze9QDP6SvfiXSz1BF+91+0MeI1d2yxgOhU/O+CvtiZ9jSkHhFAw==", - "license": "MIT", - "dependencies": { - "@octokit/types": "^16.0.0" - }, - "engines": { - "node": ">= 20" - }, - "peerDependencies": { - "@octokit/core": ">=6" - } - }, "node_modules/@actions/github/node_modules/undici": { "version": "6.23.0", "resolved": "https://registry.npmjs.org/undici/-/undici-6.23.0.tgz", @@ -2138,6 +2108,21 @@ "integrity": "sha512-whrdktVs1h6gtR+09+QsNk2+FO+49j6ga1c55YZudfEG+oKJVvJLQi3zkOm5JjiUXAagWK2tI2kTGKJ2Ys7MGA==", "license": "MIT" }, + "node_modules/@octokit/plugin-paginate-rest": { + "version": "14.0.0", + "resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-14.0.0.tgz", + "integrity": "sha512-fNVRE7ufJiAA3XUrha2omTA39M6IXIc6GIZLvlbsm8QOQCYvpq/LkMNGyFlB1d8hTDzsAXa3OKtybdMAYsV/fw==", + "license": "MIT", + "dependencies": { + "@octokit/types": "^16.0.0" + }, + "engines": { + "node": ">= 20" + }, + "peerDependencies": { + "@octokit/core": ">=6" + } + }, "node_modules/@octokit/plugin-request-log": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/@octokit/plugin-request-log/-/plugin-request-log-1.0.4.tgz", @@ -2147,6 +2132,21 @@ "@octokit/core": ">=3" } }, + "node_modules/@octokit/plugin-rest-endpoint-methods": { + "version": "17.0.0", + "resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-17.0.0.tgz", + "integrity": "sha512-B5yCyIlOJFPqUUeiD0cnBJwWJO8lkJs5d8+ze9QDP6SvfiXSz1BF+91+0MeI1d2yxgOhU/O+CvtiZ9jSkHhFAw==", + "license": "MIT", + "dependencies": { + "@octokit/types": "^16.0.0" + }, + "engines": { + "node": ">= 20" + }, + "peerDependencies": { + "@octokit/core": ">=6" + } + }, "node_modules/@octokit/plugin-retry": { "version": "8.0.3", "resolved": "https://registry.npmjs.org/@octokit/plugin-retry/-/plugin-retry-8.0.3.tgz", @@ -9902,6 +9902,10 @@ }, "devDependencies": { "@actions/core": "*", + "@actions/github": "*", + "@octokit/core": "*", + "@octokit/plugin-paginate-rest": "*", + "@octokit/plugin-rest-endpoint-methods": "*", "@types/node": "^20.19.9", "tsx": "^4.21.0", "typescript": "^5.9.3" diff --git a/pr-checks/package.json b/pr-checks/package.json index 7ec2fdc0fa..48bcf6ba38 100644 --- a/pr-checks/package.json +++ b/pr-checks/package.json @@ -6,6 +6,10 @@ }, "devDependencies": { "@actions/core": "*", + "@actions/github": "*", + "@octokit/core": "*", + "@octokit/plugin-paginate-rest": "*", + "@octokit/plugin-rest-endpoint-methods": "*", "@types/node": "^20.19.9", "tsx": "^4.21.0", "typescript": "^5.9.3" diff --git a/pr-checks/sync-checks.ts b/pr-checks/sync-checks.ts index f447ace022..f618cdcfa8 100755 --- a/pr-checks/sync-checks.ts +++ b/pr-checks/sync-checks.ts @@ -4,8 +4,22 @@ import { parseArgs } from "node:util"; +import * as githubUtils from "@actions/github/lib/utils"; +import { type Octokit } from "@octokit/core"; +import { type PaginateInterface } from "@octokit/plugin-paginate-rest"; +import { type Api } from "@octokit/plugin-rest-endpoint-methods"; + import { OLDEST_SUPPORTED_MAJOR_VERSION } from "./config"; +/** The type of the Octokit client. */ +type ApiClient = Octokit & Api & { paginate: PaginateInterface }; + +/** Constructs an `ApiClient` using `token` for authentication. */ +function getApiClient(token: string): ApiClient { + const opts = githubUtils.getOctokitOptions(token); + return new githubUtils.GitHub(opts); +} + async function main(): Promise { const { values: options } = parseArgs({ options: { @@ -37,6 +51,9 @@ async function main(): Promise { `Oldest supported major version is: ${OLDEST_SUPPORTED_MAJOR_VERSION}`, ); + // Initialise the API client. + const client = getApiClient(options.token); + process.exit(0); } From f9f9735cd1938cb2b8381d5e175ac036fda351be Mon Sep 17 00:00:00 2001 From: "Michael B. Gale" Date: Fri, 13 Mar 2026 18:53:03 +0000 Subject: [PATCH 10/22] Add type to represent `exclusions.yml` and loading helper --- pr-checks/sync-checks.ts | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/pr-checks/sync-checks.ts b/pr-checks/sync-checks.ts index f618cdcfa8..4cf4f4025b 100755 --- a/pr-checks/sync-checks.ts +++ b/pr-checks/sync-checks.ts @@ -2,15 +2,30 @@ /** Update the required checks based on the current branch. */ +import * as fs from "fs"; import { parseArgs } from "node:util"; import * as githubUtils from "@actions/github/lib/utils"; import { type Octokit } from "@octokit/core"; import { type PaginateInterface } from "@octokit/plugin-paginate-rest"; import { type Api } from "@octokit/plugin-rest-endpoint-methods"; +import * as yaml from "yaml"; import { OLDEST_SUPPORTED_MAJOR_VERSION } from "./config"; +/** Represents a configuration of which checks should not be set up as required checks. */ +interface Exclusions { + /** A list of strings that, if contained in a check name, are excluded. */ + contains: string[]; + /** A list of check names that are excluded if their name is an exact match. */ + is: string[]; +} + +/** Loads the configuration for which checks to exclude. */ +function loadExclusions(): Exclusions { + return yaml.parse(fs.readFileSync("excluded.yml", "utf-8")) as Exclusions; +} + /** The type of the Octokit client. */ type ApiClient = Octokit & Api & { paginate: PaginateInterface }; From 8291875e31572131fe2083e33d1a8c473acd7625 Mon Sep 17 00:00:00 2001 From: "Michael B. Gale" Date: Fri, 13 Mar 2026 19:00:54 +0000 Subject: [PATCH 11/22] Fetch and filter check runs for `ref` --- pr-checks/sync-checks.ts | 91 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 91 insertions(+) diff --git a/pr-checks/sync-checks.ts b/pr-checks/sync-checks.ts index 4cf4f4025b..55c5bd3b23 100755 --- a/pr-checks/sync-checks.ts +++ b/pr-checks/sync-checks.ts @@ -13,6 +13,12 @@ import * as yaml from "yaml"; import { OLDEST_SUPPORTED_MAJOR_VERSION } from "./config"; +/** Identifies the CodeQL Action repository. */ +const codeqlActionRepo = { + owner: "github", + repo: "codeql-action", +}; + /** Represents a configuration of which checks should not be set up as required checks. */ interface Exclusions { /** A list of strings that, if contained in a check name, are excluded. */ @@ -35,6 +41,86 @@ function getApiClient(token: string): ApiClient { return new githubUtils.GitHub(opts); } +/** + * Represents information about a check run. We track the `app_id` that generated the check, + * because the API will require it in addition to the name in the future. + */ +interface CheckInfo { + /** The display name of the check. */ + context: string; + /** The ID of the app that generated the check. */ + app_id: number; +} + +/** Removes entries from `checkInfos` based the configuration. */ +export function removeExcluded( + exclusions: Exclusions, + checkInfos: CheckInfo[], +): CheckInfo[] { + console.log(exclusions); + + return checkInfos.filter((checkInfo) => { + if (exclusions.is.includes(checkInfo.context)) { + console.info( + `Excluding '${checkInfo.context}' because it is an exact exclusion.`, + ); + return false; + } + + for (const containsStr of exclusions.contains) { + if (checkInfo.context.includes(containsStr)) { + console.info( + `Excluding '${checkInfo.context}' because it contains '${containsStr}'.`, + ); + return false; + } + } + + // Keep. + return true; + }); +} + +/** Gets a list of check run names for `ref`. */ +async function getChecksFor( + client: ApiClient, + ref: string, +): Promise { + console.info(`Getting checks for '${ref}'`); + + const response = await client.paginate( + "GET /repos/{owner}/{repo}/commits/{ref}/check-runs", + { + ...codeqlActionRepo, + ref, + }, + ); + + if (response.length === 0) { + throw new Error(`No checks found for '${ref}'.`); + } + + console.info(`Retrieved ${response.length} check runs.`); + + const notSkipped = response.filter( + (checkRun) => checkRun.conclusion !== "skipped", + ); + console.info(`Of those: ${notSkipped.length} were not skipped.`); + + // We use the ID of the app that generated the check run when returned by the API, + // but default to -1 to tell the API that any check with the given name should be + // required. + const checkInfos = notSkipped.map((check) => ({ + context: check.name, + app_id: check.app?.id || -1, + })); + + // Load the configuration for which checks to exclude and apply it before + // returning the checks. + const exclusions = loadExclusions(); + return removeExcluded(exclusions, checkInfos); +} + async function main(): Promise { const { values: options } = parseArgs({ options: { @@ -69,6 +155,11 @@ async function main(): Promise { // Initialise the API client. const client = getApiClient(options.token); + // Find the check runs for the specified `ref` that we will later set as the required checks + // for the main and release branches. + const checkInfos = await getChecksFor(client, options.ref); + const checkNames = new Set(checkInfos.map((info) => info.context)); + process.exit(0); } From 99ca4314840234cd1a98dde867aa7df957997616 Mon Sep 17 00:00:00 2001 From: "Michael B. Gale" Date: Fri, 13 Mar 2026 19:05:27 +0000 Subject: [PATCH 12/22] Fetch release branches and identify major versions --- pr-checks/sync-checks.ts | 41 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/pr-checks/sync-checks.ts b/pr-checks/sync-checks.ts index 55c5bd3b23..38a6f599bb 100755 --- a/pr-checks/sync-checks.ts +++ b/pr-checks/sync-checks.ts @@ -121,6 +121,15 @@ async function getChecksFor( return removeExcluded(exclusions, checkInfos); } +/** Gets the current list of release branches. */ +async function getReleaseBranches(client: ApiClient): Promise { + const refs = await client.rest.git.listMatchingRefs({ + ...codeqlActionRepo, + ref: "heads/releases/v", + }); + return refs.data.map((ref) => ref.ref).sort(); +} + async function main(): Promise { const { values: options } = parseArgs({ options: { @@ -160,6 +169,38 @@ async function main(): Promise { const checkInfos = await getChecksFor(client, options.ref); const checkNames = new Set(checkInfos.map((info) => info.context)); + // Retrieve the refs of the release branches. + const releaseBranches = await getReleaseBranches(client); + console.info( + `Found ${releaseBranches.length} release branches: ${releaseBranches.join(", ")}`, + ); + + for (const releaseBranchRef of releaseBranches) { + // Sanity check that the ref name is in the expected format and extract the major version. + const releaseBranchMatch = releaseBranchRef.match( + /^refs\/heads\/(releases\/v(\d+))/, + ); + if (!releaseBranchMatch) { + console.warn( + `Branch ref '${releaseBranchRef}' not in the expected format.`, + ); + continue; + } + const releaseBranch = releaseBranchMatch[1]; + const releaseBranchMajor = Number.parseInt(releaseBranchMatch[2]); + + // Update the required checks for this major version if it is still supported. + if (releaseBranchMajor < OLDEST_SUPPORTED_MAJOR_VERSION) { + console.info( + `Skipping '${releaseBranch}' since it is older than v${OLDEST_SUPPORTED_MAJOR_VERSION}`, + ); + continue; + } else { + console.info(`Updating '${releaseBranch}'...`); + + } + } + process.exit(0); } From 7479f9f88b6d0479318ff36d6e098429f09d3cac Mon Sep 17 00:00:00 2001 From: "Michael B. Gale" Date: Fri, 13 Mar 2026 19:10:18 +0000 Subject: [PATCH 13/22] Identify changes before applying them --- pr-checks/sync-checks.ts | 42 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 41 insertions(+), 1 deletion(-) diff --git a/pr-checks/sync-checks.ts b/pr-checks/sync-checks.ts index 38a6f599bb..b1b2a8dd59 100755 --- a/pr-checks/sync-checks.ts +++ b/pr-checks/sync-checks.ts @@ -130,6 +130,46 @@ async function getReleaseBranches(client: ApiClient): Promise { return refs.data.map((ref) => ref.ref).sort(); } +/** Sets `checkNames` as required checks for `branch`. */ +async function updateBranch( + client: ApiClient, + branch: string, + checkNames: Set, +) { + // Query the current set of required checks for this branch. + const currentContexts = await client.rest.repos.getAllStatusCheckContexts({ + ...codeqlActionRepo, + branch, + }); + + // Identify which required checks we will remove and which ones we will add. + const currentCheckNames = new Set(currentContexts.data); + let additions = 0; + let removals = 0; + let unchanged = 0; + + for (const currentCheck of currentCheckNames) { + if (!checkNames.has(currentCheck)) { + console.info(`- Removing '${currentCheck}' for branch '${branch}'`); + removals++; + } else { + unchanged++; + } + } + for (const newCheck of checkNames) { + if (!currentCheckNames.has(newCheck)) { + console.info(`+ Adding '${newCheck}' for branch '${branch}'`); + additions++; + } + } + + console.info( + `For '${branch}': ${removals} removals; ${additions} additions; ${unchanged} unchanged`, + ); + + // TODO: actually perform the update +} + async function main(): Promise { const { values: options } = parseArgs({ options: { @@ -197,7 +237,7 @@ async function main(): Promise { continue; } else { console.info(`Updating '${releaseBranch}'...`); - + await updateBranch(client, releaseBranch, checkNames); } } From 5eeed7e320c997a04e89b4cc88d374561478d725 Mon Sep 17 00:00:00 2001 From: "Michael B. Gale" Date: Fri, 13 Mar 2026 19:11:55 +0000 Subject: [PATCH 14/22] Call `updateBranch` for `main` --- pr-checks/sync-checks.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pr-checks/sync-checks.ts b/pr-checks/sync-checks.ts index b1b2a8dd59..e7226914aa 100755 --- a/pr-checks/sync-checks.ts +++ b/pr-checks/sync-checks.ts @@ -136,6 +136,8 @@ async function updateBranch( branch: string, checkNames: Set, ) { + console.info(`Updating '${branch}'...`); + // Query the current set of required checks for this branch. const currentContexts = await client.rest.repos.getAllStatusCheckContexts({ ...codeqlActionRepo, @@ -209,6 +211,9 @@ async function main(): Promise { const checkInfos = await getChecksFor(client, options.ref); const checkNames = new Set(checkInfos.map((info) => info.context)); + // Update the main branch. + await updateBranch(client, "main", checkNames); + // Retrieve the refs of the release branches. const releaseBranches = await getReleaseBranches(client); console.info( @@ -236,7 +241,6 @@ async function main(): Promise { ); continue; } else { - console.info(`Updating '${releaseBranch}'...`); await updateBranch(client, releaseBranch, checkNames); } } From 9c5e09a2e8100c3eadad85b7cf59b082a45b9896 Mon Sep 17 00:00:00 2001 From: "Michael B. Gale" Date: Fri, 13 Mar 2026 19:17:47 +0000 Subject: [PATCH 15/22] Actually perform the update when necessary and requested --- pr-checks/sync-checks.ts | 37 ++++++++++++++++++++++++++++++++++--- 1 file changed, 34 insertions(+), 3 deletions(-) diff --git a/pr-checks/sync-checks.ts b/pr-checks/sync-checks.ts index e7226914aa..c969e2490b 100755 --- a/pr-checks/sync-checks.ts +++ b/pr-checks/sync-checks.ts @@ -13,6 +13,16 @@ import * as yaml from "yaml"; import { OLDEST_SUPPORTED_MAJOR_VERSION } from "./config"; +/** Represents the command-line options. */ +interface Options { + /** The token to use to authenticate to the GitHub API. */ + token?: string; + /** The git ref to use the checks for. */ + ref?: string; + /** Whether to actually apply the changes or not. */ + apply: boolean; +} + /** Identifies the CodeQL Action repository. */ const codeqlActionRepo = { owner: "github", @@ -130,8 +140,22 @@ async function getReleaseBranches(client: ApiClient): Promise { return refs.data.map((ref) => ref.ref).sort(); } +/** Updates the required status checks for `branch` to `checks`. */ +async function patchBranchProtectionRule( + client: ApiClient, + branch: string, + checks: Set, +) { + await client.rest.repos.setStatusCheckContexts({ + ...codeqlActionRepo, + branch, + contexts: Array.from(checks), + }); +} + /** Sets `checkNames` as required checks for `branch`. */ async function updateBranch( + options: Options, client: ApiClient, branch: string, checkNames: Set, @@ -169,7 +193,14 @@ async function updateBranch( `For '${branch}': ${removals} removals; ${additions} additions; ${unchanged} unchanged`, ); - // TODO: actually perform the update + // Perform the update if there are changes and `--apply` was specified. + if (unchanged === checkNames.size && removals === 0 && additions === 0) { + console.info("Not applying changes because there is nothing to do."); + } else if (options.apply) { + await patchBranchProtectionRule(client, branch, checkNames); + } else { + console.info("Not applying changes because `--apply` was not specified."); + } } async function main(): Promise { @@ -212,7 +243,7 @@ async function main(): Promise { const checkNames = new Set(checkInfos.map((info) => info.context)); // Update the main branch. - await updateBranch(client, "main", checkNames); + await updateBranch(options, client, "main", checkNames); // Retrieve the refs of the release branches. const releaseBranches = await getReleaseBranches(client); @@ -241,7 +272,7 @@ async function main(): Promise { ); continue; } else { - await updateBranch(client, releaseBranch, checkNames); + await updateBranch(options, client, releaseBranch, checkNames); } } From 6a3dc8c62ec717af3a77e637b36d44f8442e43ad Mon Sep 17 00:00:00 2001 From: "Michael B. Gale" Date: Fri, 13 Mar 2026 19:18:00 +0000 Subject: [PATCH 16/22] Update `CONTRIBUTING.md` --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 26e06e30d3..f3935b7a2b 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -122,7 +122,7 @@ To deprecate an older version of the Action: - Implement an Actions warning for customers using the deprecated version. 1. Wait for the deprecation period to pass. 1. Upgrade the Actions warning for customers using the deprecated version to a non-fatal error, and mention that this version of the Action is no longer supported. -1. Make a PR to bump the `OLDEST_SUPPORTED_MAJOR_VERSION` in [releases.ini](.github/releases.ini). Once this PR is merged, the release process will no longer backport changes to the deprecated release version. +1. Make a PR to bump the `OLDEST_SUPPORTED_MAJOR_VERSION` in [config.ts](pr-checks/config.ts). Once this PR is merged, the release process will no longer backport changes to the deprecated release version. ## Resources From b2bd6a3229f8213ff61df5e2667ca9930c4b60db Mon Sep 17 00:00:00 2001 From: "Michael B. Gale" Date: Fri, 13 Mar 2026 19:35:44 +0000 Subject: [PATCH 17/22] Add some unit tests for `sync-checks.ts` --- pr-checks/sync-checks.test.ts | 49 +++++++++++++++++++++++++++++++++++ pr-checks/sync-checks.ts | 4 +-- 2 files changed, 51 insertions(+), 2 deletions(-) create mode 100644 pr-checks/sync-checks.test.ts diff --git a/pr-checks/sync-checks.test.ts b/pr-checks/sync-checks.test.ts new file mode 100644 index 0000000000..2f50b0e9e5 --- /dev/null +++ b/pr-checks/sync-checks.test.ts @@ -0,0 +1,49 @@ +#!/usr/bin/env npx tsx + +/* +Tests for the sync-checks.ts script +*/ + +import * as assert from "node:assert/strict"; +import { describe, it } from "node:test"; + +import { CheckInfo, Exclusions, removeExcluded } from "./sync-checks"; + +const toCheckInfo = (name: string) => + ({ context: name, app_id: -1 }) satisfies CheckInfo; + +const expectedPartialMatches = ["PR Check - Foo", "https://example.com"].map( + toCheckInfo, +); + +const expectedExactMatches = ["CodeQL", "Update"].map(toCheckInfo); + +const testChecks = expectedExactMatches.concat(expectedPartialMatches); + +const emptyExclusions: Exclusions = { + is: [], + contains: [], +}; + +describe("removeExcluded", async () => { + await it("retains all checks if no exclusions are configured", () => { + const retained = removeExcluded(emptyExclusions, testChecks); + assert.deepEqual(retained, testChecks); + }); + + await it("removes exact matches", () => { + const retained = removeExcluded( + { ...emptyExclusions, is: ["CodeQL", "Update"] }, + testChecks, + ); + assert.deepEqual(retained, expectedPartialMatches); + }); + + await it("removes partial matches", () => { + const retained = removeExcluded( + { ...emptyExclusions, contains: ["https://", "PR Check"] }, + testChecks, + ); + assert.deepEqual(retained, expectedExactMatches); + }); +}); diff --git a/pr-checks/sync-checks.ts b/pr-checks/sync-checks.ts index c969e2490b..a8c3665b9b 100755 --- a/pr-checks/sync-checks.ts +++ b/pr-checks/sync-checks.ts @@ -30,7 +30,7 @@ const codeqlActionRepo = { }; /** Represents a configuration of which checks should not be set up as required checks. */ -interface Exclusions { +export interface Exclusions { /** A list of strings that, if contained in a check name, are excluded. */ contains: string[]; /** A list of check names that are excluded if their name is an exact match. */ @@ -55,7 +55,7 @@ function getApiClient(token: string): ApiClient { * Represents information about a check run. We track the `app_id` that generated the check, * because the API will require it in addition to the name in the future. */ -interface CheckInfo { +export interface CheckInfo { /** The display name of the check. */ context: string; /** The ID of the app that generated the check. */ From c24690a800428ee8f8f37a24c2478d3b2cee51a8 Mon Sep 17 00:00:00 2001 From: "Michael B. Gale" Date: Mon, 16 Mar 2026 09:25:52 +0000 Subject: [PATCH 18/22] Rebuild --- lib/analyze-action-post.js | 20 ++++++++++---------- lib/analyze-action.js | 20 ++++++++++---------- lib/autobuild-action.js | 20 ++++++++++---------- lib/init-action-post.js | 20 ++++++++++---------- lib/init-action.js | 20 ++++++++++---------- lib/resolve-environment-action.js | 20 ++++++++++---------- lib/setup-codeql-action.js | 20 ++++++++++---------- lib/start-proxy-action-post.js | 20 ++++++++++---------- lib/start-proxy-action.js | 20 ++++++++++---------- lib/upload-lib.js | 20 ++++++++++---------- lib/upload-sarif-action-post.js | 20 ++++++++++---------- lib/upload-sarif-action.js | 20 ++++++++++---------- 12 files changed, 120 insertions(+), 120 deletions(-) diff --git a/lib/analyze-action-post.js b/lib/analyze-action-post.js index 3cad3205d7..7055b53a8f 100644 --- a/lib/analyze-action-post.js +++ b/lib/analyze-action-post.js @@ -41057,18 +41057,18 @@ var init_dist_src2 = __esm({ } }); -// node_modules/@actions/github/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/version.js +// node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/version.js var VERSION5; var init_version2 = __esm({ - "node_modules/@actions/github/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/version.js"() { + "node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/version.js"() { VERSION5 = "17.0.0"; } }); -// node_modules/@actions/github/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/generated/endpoints.js +// node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/generated/endpoints.js var Endpoints, endpoints_default; var init_endpoints = __esm({ - "node_modules/@actions/github/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/generated/endpoints.js"() { + "node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/generated/endpoints.js"() { Endpoints = { actions: { addCustomLabelsToSelfHostedRunnerForOrg: [ @@ -43362,7 +43362,7 @@ var init_endpoints = __esm({ } }); -// node_modules/@actions/github/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/endpoints-to-methods.js +// node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/endpoints-to-methods.js function endpointsToMethods(octokit) { const newMethods = {}; for (const scope of endpointMethodsMap.keys()) { @@ -43413,7 +43413,7 @@ function decorate(octokit, scope, methodName, defaults, decorations) { } var endpointMethodsMap, handler; var init_endpoints_to_methods = __esm({ - "node_modules/@actions/github/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/endpoints-to-methods.js"() { + "node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/endpoints-to-methods.js"() { init_endpoints(); endpointMethodsMap = /* @__PURE__ */ new Map(); for (const [scope, endpoints] of Object.entries(endpoints_default)) { @@ -43491,7 +43491,7 @@ var init_endpoints_to_methods = __esm({ } }); -// node_modules/@actions/github/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/index.js +// node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/index.js var dist_src_exports2 = {}; __export(dist_src_exports2, { legacyRestEndpointMethods: () => legacyRestEndpointMethods, @@ -43511,7 +43511,7 @@ function legacyRestEndpointMethods(octokit) { }; } var init_dist_src3 = __esm({ - "node_modules/@actions/github/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/index.js"() { + "node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/index.js"() { init_version2(); init_endpoints_to_methods(); restEndpointMethods.VERSION = VERSION5; @@ -43519,7 +43519,7 @@ var init_dist_src3 = __esm({ } }); -// node_modules/@actions/github/node_modules/@octokit/plugin-paginate-rest/dist-bundle/index.js +// node_modules/@octokit/plugin-paginate-rest/dist-bundle/index.js var dist_bundle_exports = {}; __export(dist_bundle_exports, { composePaginateRest: () => composePaginateRest, @@ -43645,7 +43645,7 @@ function paginateRest(octokit) { } var VERSION6, composePaginateRest, paginatingEndpoints; var init_dist_bundle5 = __esm({ - "node_modules/@actions/github/node_modules/@octokit/plugin-paginate-rest/dist-bundle/index.js"() { + "node_modules/@octokit/plugin-paginate-rest/dist-bundle/index.js"() { VERSION6 = "0.0.0-development"; composePaginateRest = Object.assign(paginate, { iterator diff --git a/lib/analyze-action.js b/lib/analyze-action.js index d36f12b439..b7cbe5f022 100644 --- a/lib/analyze-action.js +++ b/lib/analyze-action.js @@ -41057,18 +41057,18 @@ var init_dist_src2 = __esm({ } }); -// node_modules/@actions/github/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/version.js +// node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/version.js var VERSION5; var init_version2 = __esm({ - "node_modules/@actions/github/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/version.js"() { + "node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/version.js"() { VERSION5 = "17.0.0"; } }); -// node_modules/@actions/github/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/generated/endpoints.js +// node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/generated/endpoints.js var Endpoints, endpoints_default; var init_endpoints = __esm({ - "node_modules/@actions/github/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/generated/endpoints.js"() { + "node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/generated/endpoints.js"() { Endpoints = { actions: { addCustomLabelsToSelfHostedRunnerForOrg: [ @@ -43362,7 +43362,7 @@ var init_endpoints = __esm({ } }); -// node_modules/@actions/github/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/endpoints-to-methods.js +// node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/endpoints-to-methods.js function endpointsToMethods(octokit) { const newMethods = {}; for (const scope of endpointMethodsMap.keys()) { @@ -43413,7 +43413,7 @@ function decorate(octokit, scope, methodName, defaults, decorations) { } var endpointMethodsMap, handler; var init_endpoints_to_methods = __esm({ - "node_modules/@actions/github/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/endpoints-to-methods.js"() { + "node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/endpoints-to-methods.js"() { init_endpoints(); endpointMethodsMap = /* @__PURE__ */ new Map(); for (const [scope, endpoints] of Object.entries(endpoints_default)) { @@ -43491,7 +43491,7 @@ var init_endpoints_to_methods = __esm({ } }); -// node_modules/@actions/github/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/index.js +// node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/index.js var dist_src_exports2 = {}; __export(dist_src_exports2, { legacyRestEndpointMethods: () => legacyRestEndpointMethods, @@ -43511,7 +43511,7 @@ function legacyRestEndpointMethods(octokit) { }; } var init_dist_src3 = __esm({ - "node_modules/@actions/github/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/index.js"() { + "node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/index.js"() { init_version2(); init_endpoints_to_methods(); restEndpointMethods.VERSION = VERSION5; @@ -43519,7 +43519,7 @@ var init_dist_src3 = __esm({ } }); -// node_modules/@actions/github/node_modules/@octokit/plugin-paginate-rest/dist-bundle/index.js +// node_modules/@octokit/plugin-paginate-rest/dist-bundle/index.js var dist_bundle_exports = {}; __export(dist_bundle_exports, { composePaginateRest: () => composePaginateRest, @@ -43645,7 +43645,7 @@ function paginateRest(octokit) { } var VERSION6, composePaginateRest, paginatingEndpoints; var init_dist_bundle5 = __esm({ - "node_modules/@actions/github/node_modules/@octokit/plugin-paginate-rest/dist-bundle/index.js"() { + "node_modules/@octokit/plugin-paginate-rest/dist-bundle/index.js"() { VERSION6 = "0.0.0-development"; composePaginateRest = Object.assign(paginate, { iterator diff --git a/lib/autobuild-action.js b/lib/autobuild-action.js index 17e6b918ca..851e6a14c1 100644 --- a/lib/autobuild-action.js +++ b/lib/autobuild-action.js @@ -41057,18 +41057,18 @@ var init_dist_src2 = __esm({ } }); -// node_modules/@actions/github/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/version.js +// node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/version.js var VERSION5; var init_version2 = __esm({ - "node_modules/@actions/github/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/version.js"() { + "node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/version.js"() { VERSION5 = "17.0.0"; } }); -// node_modules/@actions/github/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/generated/endpoints.js +// node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/generated/endpoints.js var Endpoints, endpoints_default; var init_endpoints = __esm({ - "node_modules/@actions/github/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/generated/endpoints.js"() { + "node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/generated/endpoints.js"() { Endpoints = { actions: { addCustomLabelsToSelfHostedRunnerForOrg: [ @@ -43362,7 +43362,7 @@ var init_endpoints = __esm({ } }); -// node_modules/@actions/github/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/endpoints-to-methods.js +// node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/endpoints-to-methods.js function endpointsToMethods(octokit) { const newMethods = {}; for (const scope of endpointMethodsMap.keys()) { @@ -43413,7 +43413,7 @@ function decorate(octokit, scope, methodName, defaults, decorations) { } var endpointMethodsMap, handler; var init_endpoints_to_methods = __esm({ - "node_modules/@actions/github/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/endpoints-to-methods.js"() { + "node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/endpoints-to-methods.js"() { init_endpoints(); endpointMethodsMap = /* @__PURE__ */ new Map(); for (const [scope, endpoints] of Object.entries(endpoints_default)) { @@ -43491,7 +43491,7 @@ var init_endpoints_to_methods = __esm({ } }); -// node_modules/@actions/github/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/index.js +// node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/index.js var dist_src_exports2 = {}; __export(dist_src_exports2, { legacyRestEndpointMethods: () => legacyRestEndpointMethods, @@ -43511,7 +43511,7 @@ function legacyRestEndpointMethods(octokit) { }; } var init_dist_src3 = __esm({ - "node_modules/@actions/github/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/index.js"() { + "node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/index.js"() { init_version2(); init_endpoints_to_methods(); restEndpointMethods.VERSION = VERSION5; @@ -43519,7 +43519,7 @@ var init_dist_src3 = __esm({ } }); -// node_modules/@actions/github/node_modules/@octokit/plugin-paginate-rest/dist-bundle/index.js +// node_modules/@octokit/plugin-paginate-rest/dist-bundle/index.js var dist_bundle_exports = {}; __export(dist_bundle_exports, { composePaginateRest: () => composePaginateRest, @@ -43645,7 +43645,7 @@ function paginateRest(octokit) { } var VERSION6, composePaginateRest, paginatingEndpoints; var init_dist_bundle5 = __esm({ - "node_modules/@actions/github/node_modules/@octokit/plugin-paginate-rest/dist-bundle/index.js"() { + "node_modules/@octokit/plugin-paginate-rest/dist-bundle/index.js"() { VERSION6 = "0.0.0-development"; composePaginateRest = Object.assign(paginate, { iterator diff --git a/lib/init-action-post.js b/lib/init-action-post.js index 247af7680c..e798c8d815 100644 --- a/lib/init-action-post.js +++ b/lib/init-action-post.js @@ -41057,18 +41057,18 @@ var init_dist_src2 = __esm({ } }); -// node_modules/@actions/github/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/version.js +// node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/version.js var VERSION5; var init_version2 = __esm({ - "node_modules/@actions/github/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/version.js"() { + "node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/version.js"() { VERSION5 = "17.0.0"; } }); -// node_modules/@actions/github/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/generated/endpoints.js +// node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/generated/endpoints.js var Endpoints, endpoints_default; var init_endpoints = __esm({ - "node_modules/@actions/github/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/generated/endpoints.js"() { + "node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/generated/endpoints.js"() { Endpoints = { actions: { addCustomLabelsToSelfHostedRunnerForOrg: [ @@ -43362,7 +43362,7 @@ var init_endpoints = __esm({ } }); -// node_modules/@actions/github/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/endpoints-to-methods.js +// node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/endpoints-to-methods.js function endpointsToMethods(octokit) { const newMethods = {}; for (const scope of endpointMethodsMap.keys()) { @@ -43413,7 +43413,7 @@ function decorate(octokit, scope, methodName, defaults, decorations) { } var endpointMethodsMap, handler; var init_endpoints_to_methods = __esm({ - "node_modules/@actions/github/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/endpoints-to-methods.js"() { + "node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/endpoints-to-methods.js"() { init_endpoints(); endpointMethodsMap = /* @__PURE__ */ new Map(); for (const [scope, endpoints] of Object.entries(endpoints_default)) { @@ -43491,7 +43491,7 @@ var init_endpoints_to_methods = __esm({ } }); -// node_modules/@actions/github/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/index.js +// node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/index.js var dist_src_exports2 = {}; __export(dist_src_exports2, { legacyRestEndpointMethods: () => legacyRestEndpointMethods, @@ -43511,7 +43511,7 @@ function legacyRestEndpointMethods(octokit) { }; } var init_dist_src3 = __esm({ - "node_modules/@actions/github/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/index.js"() { + "node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/index.js"() { init_version2(); init_endpoints_to_methods(); restEndpointMethods.VERSION = VERSION5; @@ -43519,7 +43519,7 @@ var init_dist_src3 = __esm({ } }); -// node_modules/@actions/github/node_modules/@octokit/plugin-paginate-rest/dist-bundle/index.js +// node_modules/@octokit/plugin-paginate-rest/dist-bundle/index.js var dist_bundle_exports = {}; __export(dist_bundle_exports, { composePaginateRest: () => composePaginateRest, @@ -43645,7 +43645,7 @@ function paginateRest(octokit) { } var VERSION6, composePaginateRest, paginatingEndpoints; var init_dist_bundle5 = __esm({ - "node_modules/@actions/github/node_modules/@octokit/plugin-paginate-rest/dist-bundle/index.js"() { + "node_modules/@octokit/plugin-paginate-rest/dist-bundle/index.js"() { VERSION6 = "0.0.0-development"; composePaginateRest = Object.assign(paginate, { iterator diff --git a/lib/init-action.js b/lib/init-action.js index 312b11f6ee..20390da196 100644 --- a/lib/init-action.js +++ b/lib/init-action.js @@ -41057,18 +41057,18 @@ var init_dist_src2 = __esm({ } }); -// node_modules/@actions/github/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/version.js +// node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/version.js var VERSION5; var init_version2 = __esm({ - "node_modules/@actions/github/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/version.js"() { + "node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/version.js"() { VERSION5 = "17.0.0"; } }); -// node_modules/@actions/github/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/generated/endpoints.js +// node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/generated/endpoints.js var Endpoints, endpoints_default; var init_endpoints = __esm({ - "node_modules/@actions/github/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/generated/endpoints.js"() { + "node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/generated/endpoints.js"() { Endpoints = { actions: { addCustomLabelsToSelfHostedRunnerForOrg: [ @@ -43362,7 +43362,7 @@ var init_endpoints = __esm({ } }); -// node_modules/@actions/github/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/endpoints-to-methods.js +// node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/endpoints-to-methods.js function endpointsToMethods(octokit) { const newMethods = {}; for (const scope of endpointMethodsMap.keys()) { @@ -43413,7 +43413,7 @@ function decorate(octokit, scope, methodName, defaults, decorations) { } var endpointMethodsMap, handler; var init_endpoints_to_methods = __esm({ - "node_modules/@actions/github/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/endpoints-to-methods.js"() { + "node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/endpoints-to-methods.js"() { init_endpoints(); endpointMethodsMap = /* @__PURE__ */ new Map(); for (const [scope, endpoints] of Object.entries(endpoints_default)) { @@ -43491,7 +43491,7 @@ var init_endpoints_to_methods = __esm({ } }); -// node_modules/@actions/github/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/index.js +// node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/index.js var dist_src_exports2 = {}; __export(dist_src_exports2, { legacyRestEndpointMethods: () => legacyRestEndpointMethods, @@ -43511,7 +43511,7 @@ function legacyRestEndpointMethods(octokit) { }; } var init_dist_src3 = __esm({ - "node_modules/@actions/github/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/index.js"() { + "node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/index.js"() { init_version2(); init_endpoints_to_methods(); restEndpointMethods.VERSION = VERSION5; @@ -43519,7 +43519,7 @@ var init_dist_src3 = __esm({ } }); -// node_modules/@actions/github/node_modules/@octokit/plugin-paginate-rest/dist-bundle/index.js +// node_modules/@octokit/plugin-paginate-rest/dist-bundle/index.js var dist_bundle_exports = {}; __export(dist_bundle_exports, { composePaginateRest: () => composePaginateRest, @@ -43645,7 +43645,7 @@ function paginateRest(octokit) { } var VERSION6, composePaginateRest, paginatingEndpoints; var init_dist_bundle5 = __esm({ - "node_modules/@actions/github/node_modules/@octokit/plugin-paginate-rest/dist-bundle/index.js"() { + "node_modules/@octokit/plugin-paginate-rest/dist-bundle/index.js"() { VERSION6 = "0.0.0-development"; composePaginateRest = Object.assign(paginate, { iterator diff --git a/lib/resolve-environment-action.js b/lib/resolve-environment-action.js index 24c2153a01..07b44edb78 100644 --- a/lib/resolve-environment-action.js +++ b/lib/resolve-environment-action.js @@ -41057,18 +41057,18 @@ var init_dist_src2 = __esm({ } }); -// node_modules/@actions/github/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/version.js +// node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/version.js var VERSION5; var init_version2 = __esm({ - "node_modules/@actions/github/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/version.js"() { + "node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/version.js"() { VERSION5 = "17.0.0"; } }); -// node_modules/@actions/github/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/generated/endpoints.js +// node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/generated/endpoints.js var Endpoints, endpoints_default; var init_endpoints = __esm({ - "node_modules/@actions/github/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/generated/endpoints.js"() { + "node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/generated/endpoints.js"() { Endpoints = { actions: { addCustomLabelsToSelfHostedRunnerForOrg: [ @@ -43362,7 +43362,7 @@ var init_endpoints = __esm({ } }); -// node_modules/@actions/github/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/endpoints-to-methods.js +// node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/endpoints-to-methods.js function endpointsToMethods(octokit) { const newMethods = {}; for (const scope of endpointMethodsMap.keys()) { @@ -43413,7 +43413,7 @@ function decorate(octokit, scope, methodName, defaults, decorations) { } var endpointMethodsMap, handler; var init_endpoints_to_methods = __esm({ - "node_modules/@actions/github/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/endpoints-to-methods.js"() { + "node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/endpoints-to-methods.js"() { init_endpoints(); endpointMethodsMap = /* @__PURE__ */ new Map(); for (const [scope, endpoints] of Object.entries(endpoints_default)) { @@ -43491,7 +43491,7 @@ var init_endpoints_to_methods = __esm({ } }); -// node_modules/@actions/github/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/index.js +// node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/index.js var dist_src_exports2 = {}; __export(dist_src_exports2, { legacyRestEndpointMethods: () => legacyRestEndpointMethods, @@ -43511,7 +43511,7 @@ function legacyRestEndpointMethods(octokit) { }; } var init_dist_src3 = __esm({ - "node_modules/@actions/github/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/index.js"() { + "node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/index.js"() { init_version2(); init_endpoints_to_methods(); restEndpointMethods.VERSION = VERSION5; @@ -43519,7 +43519,7 @@ var init_dist_src3 = __esm({ } }); -// node_modules/@actions/github/node_modules/@octokit/plugin-paginate-rest/dist-bundle/index.js +// node_modules/@octokit/plugin-paginate-rest/dist-bundle/index.js var dist_bundle_exports = {}; __export(dist_bundle_exports, { composePaginateRest: () => composePaginateRest, @@ -43645,7 +43645,7 @@ function paginateRest(octokit) { } var VERSION6, composePaginateRest, paginatingEndpoints; var init_dist_bundle5 = __esm({ - "node_modules/@actions/github/node_modules/@octokit/plugin-paginate-rest/dist-bundle/index.js"() { + "node_modules/@octokit/plugin-paginate-rest/dist-bundle/index.js"() { VERSION6 = "0.0.0-development"; composePaginateRest = Object.assign(paginate, { iterator diff --git a/lib/setup-codeql-action.js b/lib/setup-codeql-action.js index d826367eee..19e1280a9e 100644 --- a/lib/setup-codeql-action.js +++ b/lib/setup-codeql-action.js @@ -41057,18 +41057,18 @@ var init_dist_src2 = __esm({ } }); -// node_modules/@actions/github/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/version.js +// node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/version.js var VERSION5; var init_version2 = __esm({ - "node_modules/@actions/github/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/version.js"() { + "node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/version.js"() { VERSION5 = "17.0.0"; } }); -// node_modules/@actions/github/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/generated/endpoints.js +// node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/generated/endpoints.js var Endpoints, endpoints_default; var init_endpoints = __esm({ - "node_modules/@actions/github/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/generated/endpoints.js"() { + "node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/generated/endpoints.js"() { Endpoints = { actions: { addCustomLabelsToSelfHostedRunnerForOrg: [ @@ -43362,7 +43362,7 @@ var init_endpoints = __esm({ } }); -// node_modules/@actions/github/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/endpoints-to-methods.js +// node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/endpoints-to-methods.js function endpointsToMethods(octokit) { const newMethods = {}; for (const scope of endpointMethodsMap.keys()) { @@ -43413,7 +43413,7 @@ function decorate(octokit, scope, methodName, defaults, decorations) { } var endpointMethodsMap, handler; var init_endpoints_to_methods = __esm({ - "node_modules/@actions/github/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/endpoints-to-methods.js"() { + "node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/endpoints-to-methods.js"() { init_endpoints(); endpointMethodsMap = /* @__PURE__ */ new Map(); for (const [scope, endpoints] of Object.entries(endpoints_default)) { @@ -43491,7 +43491,7 @@ var init_endpoints_to_methods = __esm({ } }); -// node_modules/@actions/github/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/index.js +// node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/index.js var dist_src_exports2 = {}; __export(dist_src_exports2, { legacyRestEndpointMethods: () => legacyRestEndpointMethods, @@ -43511,7 +43511,7 @@ function legacyRestEndpointMethods(octokit) { }; } var init_dist_src3 = __esm({ - "node_modules/@actions/github/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/index.js"() { + "node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/index.js"() { init_version2(); init_endpoints_to_methods(); restEndpointMethods.VERSION = VERSION5; @@ -43519,7 +43519,7 @@ var init_dist_src3 = __esm({ } }); -// node_modules/@actions/github/node_modules/@octokit/plugin-paginate-rest/dist-bundle/index.js +// node_modules/@octokit/plugin-paginate-rest/dist-bundle/index.js var dist_bundle_exports = {}; __export(dist_bundle_exports, { composePaginateRest: () => composePaginateRest, @@ -43645,7 +43645,7 @@ function paginateRest(octokit) { } var VERSION6, composePaginateRest, paginatingEndpoints; var init_dist_bundle5 = __esm({ - "node_modules/@actions/github/node_modules/@octokit/plugin-paginate-rest/dist-bundle/index.js"() { + "node_modules/@octokit/plugin-paginate-rest/dist-bundle/index.js"() { VERSION6 = "0.0.0-development"; composePaginateRest = Object.assign(paginate, { iterator diff --git a/lib/start-proxy-action-post.js b/lib/start-proxy-action-post.js index 0d3cec0719..f7e8fd680a 100644 --- a/lib/start-proxy-action-post.js +++ b/lib/start-proxy-action-post.js @@ -41057,18 +41057,18 @@ var init_dist_src2 = __esm({ } }); -// node_modules/@actions/github/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/version.js +// node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/version.js var VERSION5; var init_version2 = __esm({ - "node_modules/@actions/github/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/version.js"() { + "node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/version.js"() { VERSION5 = "17.0.0"; } }); -// node_modules/@actions/github/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/generated/endpoints.js +// node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/generated/endpoints.js var Endpoints, endpoints_default; var init_endpoints = __esm({ - "node_modules/@actions/github/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/generated/endpoints.js"() { + "node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/generated/endpoints.js"() { Endpoints = { actions: { addCustomLabelsToSelfHostedRunnerForOrg: [ @@ -43362,7 +43362,7 @@ var init_endpoints = __esm({ } }); -// node_modules/@actions/github/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/endpoints-to-methods.js +// node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/endpoints-to-methods.js function endpointsToMethods(octokit) { const newMethods = {}; for (const scope of endpointMethodsMap.keys()) { @@ -43413,7 +43413,7 @@ function decorate(octokit, scope, methodName, defaults, decorations) { } var endpointMethodsMap, handler; var init_endpoints_to_methods = __esm({ - "node_modules/@actions/github/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/endpoints-to-methods.js"() { + "node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/endpoints-to-methods.js"() { init_endpoints(); endpointMethodsMap = /* @__PURE__ */ new Map(); for (const [scope, endpoints] of Object.entries(endpoints_default)) { @@ -43491,7 +43491,7 @@ var init_endpoints_to_methods = __esm({ } }); -// node_modules/@actions/github/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/index.js +// node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/index.js var dist_src_exports2 = {}; __export(dist_src_exports2, { legacyRestEndpointMethods: () => legacyRestEndpointMethods, @@ -43511,7 +43511,7 @@ function legacyRestEndpointMethods(octokit) { }; } var init_dist_src3 = __esm({ - "node_modules/@actions/github/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/index.js"() { + "node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/index.js"() { init_version2(); init_endpoints_to_methods(); restEndpointMethods.VERSION = VERSION5; @@ -43519,7 +43519,7 @@ var init_dist_src3 = __esm({ } }); -// node_modules/@actions/github/node_modules/@octokit/plugin-paginate-rest/dist-bundle/index.js +// node_modules/@octokit/plugin-paginate-rest/dist-bundle/index.js var dist_bundle_exports = {}; __export(dist_bundle_exports, { composePaginateRest: () => composePaginateRest, @@ -43645,7 +43645,7 @@ function paginateRest(octokit) { } var VERSION6, composePaginateRest, paginatingEndpoints; var init_dist_bundle5 = __esm({ - "node_modules/@actions/github/node_modules/@octokit/plugin-paginate-rest/dist-bundle/index.js"() { + "node_modules/@octokit/plugin-paginate-rest/dist-bundle/index.js"() { VERSION6 = "0.0.0-development"; composePaginateRest = Object.assign(paginate, { iterator diff --git a/lib/start-proxy-action.js b/lib/start-proxy-action.js index 630151ee32..b82c61b585 100644 --- a/lib/start-proxy-action.js +++ b/lib/start-proxy-action.js @@ -41057,18 +41057,18 @@ var init_dist_src2 = __esm({ } }); -// node_modules/@actions/github/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/version.js +// node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/version.js var VERSION5; var init_version2 = __esm({ - "node_modules/@actions/github/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/version.js"() { + "node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/version.js"() { VERSION5 = "17.0.0"; } }); -// node_modules/@actions/github/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/generated/endpoints.js +// node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/generated/endpoints.js var Endpoints, endpoints_default; var init_endpoints = __esm({ - "node_modules/@actions/github/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/generated/endpoints.js"() { + "node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/generated/endpoints.js"() { Endpoints = { actions: { addCustomLabelsToSelfHostedRunnerForOrg: [ @@ -43362,7 +43362,7 @@ var init_endpoints = __esm({ } }); -// node_modules/@actions/github/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/endpoints-to-methods.js +// node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/endpoints-to-methods.js function endpointsToMethods(octokit) { const newMethods = {}; for (const scope of endpointMethodsMap.keys()) { @@ -43413,7 +43413,7 @@ function decorate(octokit, scope, methodName, defaults, decorations) { } var endpointMethodsMap, handler; var init_endpoints_to_methods = __esm({ - "node_modules/@actions/github/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/endpoints-to-methods.js"() { + "node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/endpoints-to-methods.js"() { init_endpoints(); endpointMethodsMap = /* @__PURE__ */ new Map(); for (const [scope, endpoints] of Object.entries(endpoints_default)) { @@ -43491,7 +43491,7 @@ var init_endpoints_to_methods = __esm({ } }); -// node_modules/@actions/github/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/index.js +// node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/index.js var dist_src_exports2 = {}; __export(dist_src_exports2, { legacyRestEndpointMethods: () => legacyRestEndpointMethods, @@ -43511,7 +43511,7 @@ function legacyRestEndpointMethods(octokit) { }; } var init_dist_src3 = __esm({ - "node_modules/@actions/github/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/index.js"() { + "node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/index.js"() { init_version2(); init_endpoints_to_methods(); restEndpointMethods.VERSION = VERSION5; @@ -43519,7 +43519,7 @@ var init_dist_src3 = __esm({ } }); -// node_modules/@actions/github/node_modules/@octokit/plugin-paginate-rest/dist-bundle/index.js +// node_modules/@octokit/plugin-paginate-rest/dist-bundle/index.js var dist_bundle_exports = {}; __export(dist_bundle_exports, { composePaginateRest: () => composePaginateRest, @@ -43645,7 +43645,7 @@ function paginateRest(octokit) { } var VERSION6, composePaginateRest, paginatingEndpoints; var init_dist_bundle5 = __esm({ - "node_modules/@actions/github/node_modules/@octokit/plugin-paginate-rest/dist-bundle/index.js"() { + "node_modules/@octokit/plugin-paginate-rest/dist-bundle/index.js"() { VERSION6 = "0.0.0-development"; composePaginateRest = Object.assign(paginate, { iterator diff --git a/lib/upload-lib.js b/lib/upload-lib.js index f49b4c42ba..07ffa00c58 100644 --- a/lib/upload-lib.js +++ b/lib/upload-lib.js @@ -42354,18 +42354,18 @@ var init_dist_src2 = __esm({ } }); -// node_modules/@actions/github/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/version.js +// node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/version.js var VERSION5; var init_version2 = __esm({ - "node_modules/@actions/github/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/version.js"() { + "node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/version.js"() { VERSION5 = "17.0.0"; } }); -// node_modules/@actions/github/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/generated/endpoints.js +// node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/generated/endpoints.js var Endpoints, endpoints_default; var init_endpoints = __esm({ - "node_modules/@actions/github/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/generated/endpoints.js"() { + "node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/generated/endpoints.js"() { Endpoints = { actions: { addCustomLabelsToSelfHostedRunnerForOrg: [ @@ -44659,7 +44659,7 @@ var init_endpoints = __esm({ } }); -// node_modules/@actions/github/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/endpoints-to-methods.js +// node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/endpoints-to-methods.js function endpointsToMethods(octokit) { const newMethods = {}; for (const scope of endpointMethodsMap.keys()) { @@ -44710,7 +44710,7 @@ function decorate(octokit, scope, methodName, defaults, decorations) { } var endpointMethodsMap, handler; var init_endpoints_to_methods = __esm({ - "node_modules/@actions/github/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/endpoints-to-methods.js"() { + "node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/endpoints-to-methods.js"() { init_endpoints(); endpointMethodsMap = /* @__PURE__ */ new Map(); for (const [scope, endpoints] of Object.entries(endpoints_default)) { @@ -44788,7 +44788,7 @@ var init_endpoints_to_methods = __esm({ } }); -// node_modules/@actions/github/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/index.js +// node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/index.js var dist_src_exports2 = {}; __export(dist_src_exports2, { legacyRestEndpointMethods: () => legacyRestEndpointMethods, @@ -44808,7 +44808,7 @@ function legacyRestEndpointMethods(octokit) { }; } var init_dist_src3 = __esm({ - "node_modules/@actions/github/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/index.js"() { + "node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/index.js"() { init_version2(); init_endpoints_to_methods(); restEndpointMethods.VERSION = VERSION5; @@ -44816,7 +44816,7 @@ var init_dist_src3 = __esm({ } }); -// node_modules/@actions/github/node_modules/@octokit/plugin-paginate-rest/dist-bundle/index.js +// node_modules/@octokit/plugin-paginate-rest/dist-bundle/index.js var dist_bundle_exports = {}; __export(dist_bundle_exports, { composePaginateRest: () => composePaginateRest, @@ -44942,7 +44942,7 @@ function paginateRest(octokit) { } var VERSION6, composePaginateRest, paginatingEndpoints; var init_dist_bundle5 = __esm({ - "node_modules/@actions/github/node_modules/@octokit/plugin-paginate-rest/dist-bundle/index.js"() { + "node_modules/@octokit/plugin-paginate-rest/dist-bundle/index.js"() { VERSION6 = "0.0.0-development"; composePaginateRest = Object.assign(paginate, { iterator diff --git a/lib/upload-sarif-action-post.js b/lib/upload-sarif-action-post.js index 361becddc5..958e011535 100644 --- a/lib/upload-sarif-action-post.js +++ b/lib/upload-sarif-action-post.js @@ -41057,18 +41057,18 @@ var init_dist_src2 = __esm({ } }); -// node_modules/@actions/github/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/version.js +// node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/version.js var VERSION5; var init_version2 = __esm({ - "node_modules/@actions/github/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/version.js"() { + "node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/version.js"() { VERSION5 = "17.0.0"; } }); -// node_modules/@actions/github/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/generated/endpoints.js +// node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/generated/endpoints.js var Endpoints, endpoints_default; var init_endpoints = __esm({ - "node_modules/@actions/github/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/generated/endpoints.js"() { + "node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/generated/endpoints.js"() { Endpoints = { actions: { addCustomLabelsToSelfHostedRunnerForOrg: [ @@ -43362,7 +43362,7 @@ var init_endpoints = __esm({ } }); -// node_modules/@actions/github/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/endpoints-to-methods.js +// node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/endpoints-to-methods.js function endpointsToMethods(octokit) { const newMethods = {}; for (const scope of endpointMethodsMap.keys()) { @@ -43413,7 +43413,7 @@ function decorate(octokit, scope, methodName, defaults, decorations) { } var endpointMethodsMap, handler; var init_endpoints_to_methods = __esm({ - "node_modules/@actions/github/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/endpoints-to-methods.js"() { + "node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/endpoints-to-methods.js"() { init_endpoints(); endpointMethodsMap = /* @__PURE__ */ new Map(); for (const [scope, endpoints] of Object.entries(endpoints_default)) { @@ -43491,7 +43491,7 @@ var init_endpoints_to_methods = __esm({ } }); -// node_modules/@actions/github/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/index.js +// node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/index.js var dist_src_exports2 = {}; __export(dist_src_exports2, { legacyRestEndpointMethods: () => legacyRestEndpointMethods, @@ -43511,7 +43511,7 @@ function legacyRestEndpointMethods(octokit) { }; } var init_dist_src3 = __esm({ - "node_modules/@actions/github/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/index.js"() { + "node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/index.js"() { init_version2(); init_endpoints_to_methods(); restEndpointMethods.VERSION = VERSION5; @@ -43519,7 +43519,7 @@ var init_dist_src3 = __esm({ } }); -// node_modules/@actions/github/node_modules/@octokit/plugin-paginate-rest/dist-bundle/index.js +// node_modules/@octokit/plugin-paginate-rest/dist-bundle/index.js var dist_bundle_exports = {}; __export(dist_bundle_exports, { composePaginateRest: () => composePaginateRest, @@ -43645,7 +43645,7 @@ function paginateRest(octokit) { } var VERSION6, composePaginateRest, paginatingEndpoints; var init_dist_bundle5 = __esm({ - "node_modules/@actions/github/node_modules/@octokit/plugin-paginate-rest/dist-bundle/index.js"() { + "node_modules/@octokit/plugin-paginate-rest/dist-bundle/index.js"() { VERSION6 = "0.0.0-development"; composePaginateRest = Object.assign(paginate, { iterator diff --git a/lib/upload-sarif-action.js b/lib/upload-sarif-action.js index 3908d4f8c2..e6b32cd537 100644 --- a/lib/upload-sarif-action.js +++ b/lib/upload-sarif-action.js @@ -41057,18 +41057,18 @@ var init_dist_src2 = __esm({ } }); -// node_modules/@actions/github/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/version.js +// node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/version.js var VERSION5; var init_version2 = __esm({ - "node_modules/@actions/github/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/version.js"() { + "node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/version.js"() { VERSION5 = "17.0.0"; } }); -// node_modules/@actions/github/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/generated/endpoints.js +// node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/generated/endpoints.js var Endpoints, endpoints_default; var init_endpoints = __esm({ - "node_modules/@actions/github/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/generated/endpoints.js"() { + "node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/generated/endpoints.js"() { Endpoints = { actions: { addCustomLabelsToSelfHostedRunnerForOrg: [ @@ -43362,7 +43362,7 @@ var init_endpoints = __esm({ } }); -// node_modules/@actions/github/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/endpoints-to-methods.js +// node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/endpoints-to-methods.js function endpointsToMethods(octokit) { const newMethods = {}; for (const scope of endpointMethodsMap.keys()) { @@ -43413,7 +43413,7 @@ function decorate(octokit, scope, methodName, defaults, decorations) { } var endpointMethodsMap, handler; var init_endpoints_to_methods = __esm({ - "node_modules/@actions/github/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/endpoints-to-methods.js"() { + "node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/endpoints-to-methods.js"() { init_endpoints(); endpointMethodsMap = /* @__PURE__ */ new Map(); for (const [scope, endpoints] of Object.entries(endpoints_default)) { @@ -43491,7 +43491,7 @@ var init_endpoints_to_methods = __esm({ } }); -// node_modules/@actions/github/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/index.js +// node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/index.js var dist_src_exports2 = {}; __export(dist_src_exports2, { legacyRestEndpointMethods: () => legacyRestEndpointMethods, @@ -43511,7 +43511,7 @@ function legacyRestEndpointMethods(octokit) { }; } var init_dist_src3 = __esm({ - "node_modules/@actions/github/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/index.js"() { + "node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/index.js"() { init_version2(); init_endpoints_to_methods(); restEndpointMethods.VERSION = VERSION5; @@ -43519,7 +43519,7 @@ var init_dist_src3 = __esm({ } }); -// node_modules/@actions/github/node_modules/@octokit/plugin-paginate-rest/dist-bundle/index.js +// node_modules/@octokit/plugin-paginate-rest/dist-bundle/index.js var dist_bundle_exports = {}; __export(dist_bundle_exports, { composePaginateRest: () => composePaginateRest, @@ -43645,7 +43645,7 @@ function paginateRest(octokit) { } var VERSION6, composePaginateRest, paginatingEndpoints; var init_dist_bundle5 = __esm({ - "node_modules/@actions/github/node_modules/@octokit/plugin-paginate-rest/dist-bundle/index.js"() { + "node_modules/@octokit/plugin-paginate-rest/dist-bundle/index.js"() { VERSION6 = "0.0.0-development"; composePaginateRest = Object.assign(paginate, { iterator From f3032c7b3b28edd4b5d0ae41bee85b4ae01e2db6 Mon Sep 17 00:00:00 2001 From: "Michael B. Gale" Date: Mon, 16 Mar 2026 09:34:25 +0000 Subject: [PATCH 19/22] Add `excluded.yml` path to `config.ts` --- pr-checks/config.ts | 8 ++++++++ pr-checks/sync-checks.ts | 9 +++++++-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/pr-checks/config.ts b/pr-checks/config.ts index 73001f13d5..7f2826d59c 100644 --- a/pr-checks/config.ts +++ b/pr-checks/config.ts @@ -1,2 +1,10 @@ +import path from "path"; + /** The oldest supported major version of the CodeQL Action. */ export const OLDEST_SUPPORTED_MAJOR_VERSION = 3; + +/** The `pr-checks` directory. */ +export const PR_CHECKS_DIR = __dirname; + +/** The path of the file configuring which checks shouldn't be required. */ +export const PR_CHECK_EXCLUDED_FILE = path.join(PR_CHECKS_DIR, "excluded.yml"); diff --git a/pr-checks/sync-checks.ts b/pr-checks/sync-checks.ts index a8c3665b9b..604f1df9de 100755 --- a/pr-checks/sync-checks.ts +++ b/pr-checks/sync-checks.ts @@ -11,7 +11,10 @@ import { type PaginateInterface } from "@octokit/plugin-paginate-rest"; import { type Api } from "@octokit/plugin-rest-endpoint-methods"; import * as yaml from "yaml"; -import { OLDEST_SUPPORTED_MAJOR_VERSION } from "./config"; +import { + OLDEST_SUPPORTED_MAJOR_VERSION, + PR_CHECK_EXCLUDED_FILE, +} from "./config"; /** Represents the command-line options. */ interface Options { @@ -39,7 +42,9 @@ export interface Exclusions { /** Loads the configuration for which checks to exclude. */ function loadExclusions(): Exclusions { - return yaml.parse(fs.readFileSync("excluded.yml", "utf-8")) as Exclusions; + return yaml.parse( + fs.readFileSync(PR_CHECK_EXCLUDED_FILE, "utf-8"), + ) as Exclusions; } /** The type of the Octokit client. */ From aa47a391746b22938fda16f57cd6a373ab20c22c Mon Sep 17 00:00:00 2001 From: "Michael B. Gale" Date: Mon, 16 Mar 2026 09:41:10 +0000 Subject: [PATCH 20/22] Tidy up `pr-checks/package.json` --- package-lock.json | 10 ++-------- pr-checks/package.json | 10 ++-------- 2 files changed, 4 insertions(+), 16 deletions(-) diff --git a/package-lock.json b/package-lock.json index 0bc967c7e1..e79fd4ac75 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9898,17 +9898,11 @@ }, "pr-checks": { "dependencies": { + "@octokit/core": "^7.0.6", "yaml": "^2.8.2" }, "devDependencies": { - "@actions/core": "*", - "@actions/github": "*", - "@octokit/core": "*", - "@octokit/plugin-paginate-rest": "*", - "@octokit/plugin-rest-endpoint-methods": "*", - "@types/node": "^20.19.9", - "tsx": "^4.21.0", - "typescript": "^5.9.3" + "tsx": "^4.21.0" } } } diff --git a/pr-checks/package.json b/pr-checks/package.json index 48bcf6ba38..a315942211 100644 --- a/pr-checks/package.json +++ b/pr-checks/package.json @@ -2,16 +2,10 @@ "private": true, "description": "Dependencies for the sync.ts", "dependencies": { + "@octokit/core": "^7.0.6", "yaml": "^2.8.2" }, "devDependencies": { - "@actions/core": "*", - "@actions/github": "*", - "@octokit/core": "*", - "@octokit/plugin-paginate-rest": "*", - "@octokit/plugin-rest-endpoint-methods": "*", - "@types/node": "^20.19.9", - "tsx": "^4.21.0", - "typescript": "^5.9.3" + "tsx": "^4.21.0" } } From d71d6bc3e27318a729b2941ad17acddcd6aee0e0 Mon Sep 17 00:00:00 2001 From: "Michael B. Gale" Date: Mon, 16 Mar 2026 09:49:08 +0000 Subject: [PATCH 21/22] Add `--verbose` option --- pr-checks/sync-checks.ts | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/pr-checks/sync-checks.ts b/pr-checks/sync-checks.ts index 604f1df9de..270990d7ad 100755 --- a/pr-checks/sync-checks.ts +++ b/pr-checks/sync-checks.ts @@ -24,6 +24,8 @@ interface Options { ref?: string; /** Whether to actually apply the changes or not. */ apply: boolean; + /** Whether to output additional information. */ + verbose: boolean; } /** Identifies the CodeQL Action repository. */ @@ -69,10 +71,13 @@ export interface CheckInfo { /** Removes entries from `checkInfos` based the configuration. */ export function removeExcluded( + options: Options, exclusions: Exclusions, checkInfos: CheckInfo[], ): CheckInfo[] { - console.log(exclusions); + if (options.verbose) { + console.log(exclusions); + } return checkInfos.filter((checkInfo) => { if (exclusions.is.includes(checkInfo.context)) { @@ -98,6 +103,7 @@ export function removeExcluded( /** Gets a list of check run names for `ref`. */ async function getChecksFor( + options: Options, client: ApiClient, ref: string, ): Promise { @@ -133,7 +139,7 @@ async function getChecksFor( // Load the configuration for which checks to exclude and apply it before // returning the checks. const exclusions = loadExclusions(); - return removeExcluded(exclusions, checkInfos); + return removeExcluded(options, exclusions, checkInfos); } /** Gets the current list of release branches. */ @@ -224,6 +230,11 @@ async function main(): Promise { type: "boolean", default: false, }, + // Whether to output additional information. + verbose: { + type: "boolean", + default: false, + }, }, strict: true, }); @@ -244,7 +255,7 @@ async function main(): Promise { // Find the check runs for the specified `ref` that we will later set as the required checks // for the main and release branches. - const checkInfos = await getChecksFor(client, options.ref); + const checkInfos = await getChecksFor(options, client, options.ref); const checkNames = new Set(checkInfos.map((info) => info.context)); // Update the main branch. From c9ad41d3515bb1673750335fbfd45808f240e668 Mon Sep 17 00:00:00 2001 From: "Michael B. Gale" Date: Mon, 16 Mar 2026 09:55:45 +0000 Subject: [PATCH 22/22] Configure ESLint `import/no-extraneous-dependencies` rule for `pr-checks` --- eslint.config.mjs | 27 +++++++++++++++++++++------ 1 file changed, 21 insertions(+), 6 deletions(-) diff --git a/eslint.config.mjs b/eslint.config.mjs index bc77329978..34fe49a9df 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -7,7 +7,11 @@ import noAsyncForeach from "eslint-plugin-no-async-foreach"; import jsdoc from "eslint-plugin-jsdoc"; import tseslint from "typescript-eslint"; import globals from "globals"; +import path from "path"; +import { fileURLToPath } from "url"; +const __filename = fileURLToPath(import.meta.url); +const __dirname = path.dirname(__filename); const githubFlatConfigs = github.getFlatConfigs(); export default [ @@ -43,7 +47,7 @@ export default [ plugins: { "import-x": importX, "no-async-foreach": fixupPluginRules(noAsyncForeach), - "jsdoc": jsdoc, + jsdoc: jsdoc, }, languageOptions: { @@ -67,7 +71,13 @@ export default [ typescript: {}, }, - "import/ignore": ["sinon", "uuid", "@octokit/plugin-retry", "del", "get-folder-size"], + "import/ignore": [ + "sinon", + "uuid", + "@octokit/plugin-retry", + "del", + "get-folder-size", + ], "import-x/resolver-next": [ createTypeScriptImportResolver(), createNodeResolver({ @@ -143,7 +153,7 @@ export default [ // We don't currently require full JSDoc coverage, so this rule // should not error on missing @param annotations. disableMissingParamChecks: true, - } + }, ], }, }, @@ -162,9 +172,9 @@ export default [ "@typescript-eslint/no-unused-vars": [ "error", { - "args": "all", - "argsIgnorePattern": "^_", - } + args: "all", + argsIgnorePattern: "^_", + }, ], "func-style": "off", }, @@ -183,6 +193,11 @@ export default [ // The scripts in `pr-checks` are expected to output to the console. "no-console": "off", + "import/no-extraneous-dependencies": [ + "error", + { packageDir: [__dirname, path.resolve(__dirname, "pr-checks")] }, + ], + "@typescript-eslint/no-floating-promises": [ "error", {