Visitar URL original
Merge main into releases/v4 by github-actions[bot] · Pull Request #4027 · github/codeql-action · GitHub
Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
Show all changes
65 commits
Select commit Hold shift + click to select a range
dab0ab7
Make `undici` an explicit dependency
mbg Jun 23, 2026
8763bac
Add `RegistryProxyVars` enum
mbg Jul 13, 2026
5172487
Allow `getTestEnv` to be parameterised over initial env
mbg Jul 13, 2026
a29dee4
Add minimal proxy init code
mbg Jul 8, 2026
e387ec1
Move `init` step at the end of `start-proxy` test workflow
mbg Jul 13, 2026
b0eaa56
Set language inputs in `start-proxy` check workflow
mbg Jul 13, 2026
b6d92e3
Set `CODEQL_PROXY_*` vars for `init` step in test workflow
mbg Jul 13, 2026
50b3687
Specify custom `config-file` in `start-proxy` check
mbg Jul 13, 2026
4c2bf01
Scaffold basic `update-release-branch.ts`
mbg Jul 14, 2026
8505293
Add constants
mbg Jul 14, 2026
1495237
Add `getGitHubToken`
mbg Jul 14, 2026
a10d7a7
Parse command line options
mbg Jul 14, 2026
d0b11ca
Make script executable
mbg Jul 14, 2026
1b146d1
Validate target branch and extract major version
mbg Jul 14, 2026
440cebc
Add `getCurrentVersion`
mbg Jul 14, 2026
4ca9f53
Add `runGit` and use it to obtain the source branch SHA
mbg Jul 14, 2026
c3da0a9
Fetch commit info
mbg Jul 14, 2026
5579217
Check whether the new branch exists
mbg Jul 14, 2026
460cc0c
Add dry run support and push branch
mbg Jul 14, 2026
212aa33
Add `runCommand`
mbg Jul 14, 2026
c8ed70e
Add `rebuildAction` function
mbg Jul 14, 2026
639fc5d
Add changelog helpers
mbg Jul 14, 2026
5e21203
Add `prepareNewBranch`
mbg Jul 14, 2026
78d71fb
Create PR
mbg Jul 14, 2026
5c030f4
Add summary comment
mbg Jul 14, 2026
2c45c81
Add `DryRunOption` interface
mbg Jul 14, 2026
4b861b8
Move changelog-related definitions into their own module
mbg Jul 14, 2026
e2472fc
Make `processChangelogForBackports` dry-run-aware
mbg Jul 14, 2026
fd0ae66
Restore some comments
mbg Jul 14, 2026
d4b3323
Use TS script in workflow
mbg Jul 14, 2026
f9a9f48
Run `npm ci` in `release-initialise` workflow.
mbg Jul 14, 2026
583bf3e
Fix comment typos
mbg Jul 14, 2026
d694648
Make `changelog.ts` more testable and add tests
mbg Jul 14, 2026
9b314f4
Make `replaceVersionInPackageJson` dry-run-aware
mbg Jul 14, 2026
a464bf1
Move `package.json` helpers into their own file
mbg Jul 14, 2026
ae48798
Make `versions.ts` testable and add basic tests
mbg Jul 14, 2026
80599cc
Allow proxy to be threaded into `createApiClientWithDetails`
mbg Jul 14, 2026
6d70593
Gate proxy usage behind FF
mbg Jul 14, 2026
205b37b
Use `ActionState` for `getRegistryProxy`
mbg Jul 14, 2026
b946565
Add and use `clone` method for `ReadOnlyEnv`
mbg Jul 14, 2026
47e9c29
Log whether the proxy is picked up on
mbg Jul 14, 2026
a1c676d
Test proxy usage for `getRemoteConfig`
mbg Jul 14, 2026
d705aa3
Merge remote-tracking branch 'origin/main' into mbg/use-registry-prox…
mbg Jul 14, 2026
1a0eca3
Validate `proxy` argument in tests
mbg Jul 14, 2026
41c7af7
Use `paginate`
mbg Jul 15, 2026
423e341
Delete python version
mbg Jul 15, 2026
7b19180
Merge remote-tracking branch 'origin/main' into mbg/use-registry-prox…
mbg Jul 16, 2026
4292bd7
Remove unneeded type assertion now that `ApiClient` exists
mbg Jul 16, 2026
1226301
Update changelog and version after v4.37.1
github-actions[bot] Jul 16, 2026
0297913
Rebuild
github-actions[bot] Jul 16, 2026
7c4a258
Merge pull request #4021 from github/mergeback/v4.37.1-to-main-7188fc36
oscarsj Jul 16, 2026
8125f87
Remove unused `getApiFetch`
mbg Jul 16, 2026
7db34ae
Refactor looking up proxy env vars into `getRegistryProxyConfig`.
mbg Jul 17, 2026
cf46341
Merge pull request #4007 from github/mbg/use-registry-proxy-for-repo-…
mbg Jul 17, 2026
da21ad6
Remove `NewRemoteFileAddresses` FF and default to its behaviour
mbg Jul 20, 2026
dd35309
Remove explicit FF from `start-proxy` check
mbg Jul 20, 2026
b855687
Always make `docker_registry` registries available
mbg Jul 20, 2026
69fd9e9
Merge pull request #4024 from github/mbg/private-registry/make-docker…
mbg Jul 21, 2026
830c231
Merge pull request #4023 from github/mbg/ff/remove-new-remote-file-ad…
mbg Jul 21, 2026
dbdf0b0
Bump tar from 7.5.16 to 7.5.20
dependabot[bot] Jul 21, 2026
115e8cb
Merge pull request #4010 from github/mbg/ts/update-release-branch
mbg Jul 21, 2026
de0229c
Merge branch 'main' into dependabot/npm_and_yarn/tar-7.5.20
mbg Jul 21, 2026
385bcdc
Merge pull request #4026 from github/dependabot/npm_and_yarn/tar-7.5.20
mbg Jul 21, 2026
73aad0e
Update changelog for v4.37.2
github-actions[bot] Jul 21, 2026
e0faed8
Add a couple of change notes
mbg Jul 21, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .github/workflows/__start-proxy.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

29 changes: 4 additions & 25 deletions lib/entry-points.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion pr-checks/checks/start-proxy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ steps:
CODEQL_PROXY_HOST: ${{ steps.proxy.outputs.proxy_host }}
CODEQL_PROXY_PORT: ${{ steps.proxy.outputs.proxy_port }}
CODEQL_PROXY_CA_CERTIFICATE: ${{ steps.proxy.outputs.proxy_ca_certificate }}
CODEQL_ACTION_NEW_REMOTE_FILE_ADDRESSES: "true"
with:
languages: java
tools: ${{ steps.prepare-test.outputs.tools-url }}
Expand Down
4 changes: 1 addition & 3 deletions src/config-utils.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2607,9 +2607,7 @@ test.serial(
const getRemoteConfig = sinon.stub(file, "getRemoteConfig").resolves({});

// Construct the basic test target.
const target = callee(configUtils.loadUserConfig)
.withDefaultActionsEnv()
.withFeatures([Feature.NewRemoteFileAddresses]);
const target = callee(configUtils.loadUserConfig).withDefaultActionsEnv();

// Utility function to assert that `targetWithArgs` has identified
// the input as a remote file address.
Expand Down
12 changes: 4 additions & 8 deletions src/config-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -489,11 +489,7 @@ export async function loadUserConfig(
apiDetails: api.GitHubApiCombinedDetails,
tempDir: string,
): Promise<UserConfig> {
const allowNewFormat = await actionState.features.getValue(
Feature.NewRemoteFileAddresses,
);

if (isLocal(configFile, allowNewFormat)) {
if (isLocal(configFile)) {
if (configFile !== userConfigFromActionPath(tempDir)) {
// If the config file is not generated by the Action, it should be relative to the workspace.
configFile = path.resolve(workspacePath, configFile);
Expand All @@ -512,7 +508,7 @@ export async function loadUserConfig(
// Drop the explicit prefix if it is present. Since `REMOTE_PATH_PREFIX` is chosen
// to not conflict with permissible characters in "owner" or "repo" components,
// this does not risk removing valid parts of either component by accident.
if (allowNewFormat && isExplicitRemotePath(configFile)) {
if (isExplicitRemotePath(configFile)) {
configFile = configFile.substring(REMOTE_PATH_PREFIX.length);
}
return await getRemoteConfig(actionState, configFile, apiDetails);
Expand Down Expand Up @@ -1326,7 +1322,7 @@ function containsAtRef(configPath: string): boolean {
* @param configPath The path to test.
* @returns True if it is local, or false otherwise.
*/
function isLocal(configPath: string, allowNewFormat: boolean): boolean {
function isLocal(configPath: string): boolean {
// If the path starts with `LOCAL_PATH_PREFIX`, it is explicitly local.
// This allows local paths that would otherwise contain '@'
// to be used with a `LOCAL_PATH_PREFIX` prefix.
Expand All @@ -1335,7 +1331,7 @@ function isLocal(configPath: string, allowNewFormat: boolean): boolean {
}
// If the path starts with `REMOTE_PATH_PREFIX`, it is explicitly remote.
// This allows users to resolve ambiguity by specifying `REMOTE_PATH_PREFIX`.
if (allowNewFormat && isExplicitRemotePath(configPath)) {
if (isExplicitRemotePath(configPath)) {
return false;
}

Expand Down
5 changes: 2 additions & 3 deletions src/config/file.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ test.serial("getRemoteConfig uses proxy when it is supposed to", async (t) => {

// Should use it when the FF is enabled and the environment variables are set.
await target
.withFeatures([Feature.ProxyApiRequests, Feature.NewRemoteFileAddresses])
.withFeatures([Feature.ProxyApiRequests])
.withEnv((env) => {
env.set(RegistryProxyVars.PROXY_HOST, "localhost");
env.set(RegistryProxyVars.PROXY_PORT, "1234");
Expand All @@ -118,7 +118,6 @@ test.serial("getRemoteConfig uses proxy when it is supposed to", async (t) => {

// But not when the FF is not enabled.
await target
.withFeatures([Feature.NewRemoteFileAddresses])
.withEnv((env) => {
env.set(RegistryProxyVars.PROXY_HOST, "localhost");
env.set(RegistryProxyVars.PROXY_PORT, "1234");
Expand All @@ -128,7 +127,7 @@ test.serial("getRemoteConfig uses proxy when it is supposed to", async (t) => {

// And not when the environment variables aren't set.
await target
.withFeatures([Feature.ProxyApiRequests, Feature.NewRemoteFileAddresses])
.withFeatures([Feature.ProxyApiRequests])
.notLogs(t, "Using private registry proxy at 'http://localhost:1234'")
.throws(t, { message: errorMessage });
});
67 changes: 14 additions & 53 deletions src/config/remote-file.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ import test from "ava";
import sinon from "sinon";

import { ActionsEnvVars } from "../environment";
import * as errors from "../error-messages";
import { Feature } from "../feature-flags";
import { callee } from "../testing-utils";
import { ConfigurationError } from "../util";

Expand Down Expand Up @@ -75,15 +73,7 @@ test("parseRemoteFileAddress accepts full remote addresses", async (t) => {
for (const newFormatInput of newFormatInputs) {
const targetWithArgs = target.withArgs(newFormatInput.input);

// Should fail when the FF is not enabled.
await targetWithArgs
.withFeatures([])
.throws(t, { instanceOf: ConfigurationError });

// And pass when the FF is enabled.
await targetWithArgs
.withFeatures([Feature.NewRemoteFileAddresses])
.passes(t.deepEqual, newFormatInput.expected);
await targetWithArgs.passes(t.deepEqual, newFormatInput.expected);
}
});

Expand Down Expand Up @@ -138,15 +128,7 @@ test("parseRemoteFileAddress accepts remote address without an owner", async (t)
for (const testCase of testCases) {
const targetWithArgs = target.withArgs(testCase.input);

// Should fail when the FF is not enabled.
await targetWithArgs
.withFeatures([])
.throws(t, { instanceOf: ConfigurationError });

// And pass when the FF is enabled.
await targetWithArgs
.withFeatures([Feature.NewRemoteFileAddresses])
.passes(t.deepEqual, testCase.expected);
await targetWithArgs.passes(t.deepEqual, testCase.expected);
}
});

Expand All @@ -160,9 +142,7 @@ test("parseRemoteFileAddress throws for invalid `GITHUB_REPOSITORY`", async (t)
sinon.define(env, "getRequired", getRequired);
});

await target
.withFeatures([Feature.NewRemoteFileAddresses])
.throws(t, { instanceOf: Error });
await target.throws(t, { instanceOf: Error });

t.assert(getRequired.calledOnceWith(ActionsEnvVars.GITHUB_REPOSITORY));
});
Expand Down Expand Up @@ -194,31 +174,19 @@ test("parseRemoteFileAddress accepts remote address without a path", async (t) =
for (const testCase of testCases) {
const targetWithArgs = target.withArgs(testCase.input);

// Should fail when the FF is not enabled.
await targetWithArgs
.withFeatures([])
.throws(t, { instanceOf: ConfigurationError });

// And pass when the FF is enabled.
await targetWithArgs
.withFeatures([Feature.NewRemoteFileAddresses])
.passes(t.deepEqual, testCase.expected);
await targetWithArgs.passes(t.deepEqual, testCase.expected);
}
});

test("parseRemoteFileAddress accepts remote address without a ref", async (t) => {
const target = callee(parseRemoteFileAddress).withArgs("owner/repo:path");

// Should only accept the input if the FF is enabled.
await target.withFeatures([]).throws(t);
await target
.withFeatures([Feature.NewRemoteFileAddresses])
.passes(t.deepEqual, {
owner: "owner",
repo: "repo",
path: "path",
ref: DEFAULT_CONFIG_FILE_REF,
} satisfies RemoteFileAddress);
await target.passes(t.deepEqual, {
owner: "owner",
repo: "repo",
path: "path",
ref: DEFAULT_CONFIG_FILE_REF,
} satisfies RemoteFileAddress);
});

test("parseRemoteFileAddress rejects invalid values", async (t) => {
Expand Down Expand Up @@ -251,18 +219,11 @@ test("parseRemoteFileAddress rejects invalid values", async (t) => {
for (const testInput of testInputs) {
const targetWithArgs = target.withArgs(testInput);

// Should throw both when the new format is and isn't accepted.
await targetWithArgs.withFeatures([]).throws(t, {
await targetWithArgs.throws(t, {
// When the new format is accepted, there are some more specific
// errors in some cases. It is sufficient for us to check that
// an exception is thrown.
instanceOf: ConfigurationError,
message: errors.getConfigFileRepoOldFormatInvalidMessage(testInput),
});
await targetWithArgs
.withFeatures([Feature.NewRemoteFileAddresses])
.throws(t, {
// When the new format is accepted, there are some more specific
// errors in some cases. It is sufficient for us to check that
// an exception is thrown.
instanceOf: ConfigurationError,
});
}
});
11 changes: 0 additions & 11 deletions src/config/remote-file.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { ActionState } from "../action-common";
import { ActionsEnvVars, ReadOnlyEnv } from "../environment";
import * as errorMessages from "../error-messages";
import { Feature } from "../feature-flags";
import { ConfigurationError, Failure, Result, Success } from "../util";

/** Represents remote file addresses. */
Expand Down Expand Up @@ -126,16 +125,6 @@ export async function parseRemoteFileAddress(
return oldFormatAddressResult.value;
}

// If the FF for the new format is not enabled, throw the old format error.
const allowNewFormat = await actionState.features.getValue(
Feature.NewRemoteFileAddresses,
);
if (!allowNewFormat) {
throw new ConfigurationError(
errorMessages.getConfigFileRepoOldFormatInvalidMessage(configFile),
);
}

// retrieve the various parts of the config location, and ensure they're present
const newFormatAddressResult = parseNewRemoteFileAddress(
actionState.env,
Expand Down
7 changes: 0 additions & 7 deletions src/feature-flags.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,6 @@ export enum Feature {
ForceNightly = "force_nightly",
IgnoreGeneratedFiles = "ignore_generated_files",
JavaNetworkDebugging = "java_network_debugging",
/** Allow the new remote file address format. */
NewRemoteFileAddresses = "new_remote_file_addresses",
OverlayAnalysis = "overlay_analysis",
OverlayAnalysisCodeScanningCpp = "overlay_analysis_code_scanning_cpp",
OverlayAnalysisCodeScanningCsharp = "overlay_analysis_code_scanning_csharp",
Expand Down Expand Up @@ -266,11 +264,6 @@ export const featureConfig = {
envVar: "CODEQL_ACTION_JAVA_NETWORK_DEBUGGING",
minimumVersion: undefined,
},
[Feature.NewRemoteFileAddresses]: {
defaultValue: false,
envVar: "CODEQL_ACTION_NEW_REMOTE_FILE_ADDRESSES",
minimumVersion: undefined,
},
[Feature.OverlayAnalysis]: {
defaultValue: false,
envVar: "CODEQL_ACTION_OVERLAY_ANALYSIS",
Expand Down
Loading