Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
1f9caf0
Refactor `jobRunUuid` init into a function
mbg Jul 28, 2026
c7ae51b
Make `ActionState` available and add test
mbg Jul 28, 2026
049af32
Allow `getJobUUID` to retrieve the UUID from the environment
mbg Jul 28, 2026
766928d
Call `getJobUUID` in `start-proxy`
mbg Jul 28, 2026
e9831f7
Add `getRequiredInput` to `ActionsEnv`
mbg Jul 24, 2026
60834a0
Add `exportVariable` to `ActionsEnv`
mbg Jul 24, 2026
e28cbac
Test that `getJobUUID` calls `exportVariable`
mbg Jul 28, 2026
94a12eb
Add a test for invalid values
mbg Jul 28, 2026
2e25107
Use `getEnv()`
mbg Jul 29, 2026
de57c4a
Move `registry_types` to `StatusReportBase`
mbg Jul 29, 2026
aac07d2
Include `registry_types` whenever `CODEQL_PROXY_URLS` is set
mbg Jul 29, 2026
eb692f8
Add check to `createStatusReportBase` test
mbg Jul 29, 2026
e893985
Fix `makeValidator` returning `required: boolean`
mbg Jul 29, 2026
51d51e8
Add `boolean` `Validator` to `json` module
mbg Jul 29, 2026
e55a57b
Add `RegistryBase` schema and type
mbg Jul 29, 2026
13d4882
Validate JSON more
mbg Jul 29, 2026
42a3b94
Add `CODEQL_ACTION_` prefix to `JOB_RUN_UUID`
mbg Jul 29, 2026
3ca82bb
Change `withActions` to only allow mutations
mbg Jul 29, 2026
30c33c9
Make results of function call available to delayed checks
mbg Jul 29, 2026
3673750
Add `Env`-backed `ActionsEnv` implementation for tests
mbg Jul 29, 2026
d2f5cbb
Add `get` method to `ReadOnlyEnv`
mbg Jul 29, 2026
0cebd1d
Add `hasEnv` delayed assertion and use for `getJobUUID` test
mbg Jul 29, 2026
b411bbc
Move `getJobUUID` call into `runInActions` for `init` and `setup-codeql`
mbg Jul 29, 2026
ba46ff7
Add `transformTelemetryError` option to `Action`
mbg Jul 29, 2026
8e6fdff
Use `runInActions` for `start-proxy`
mbg Jul 29, 2026
d57c3ff
Add tests for `runInActions`
mbg Jul 29, 2026
f02afd4
Merge pull request #4049 from github/mbg/start-proxy/job-uuid
mbg Jul 29, 2026
780c00d
Merge remote-tracking branch 'origin/main' into mbg/status/registries
mbg Jul 29, 2026
8f0a4f2
Bump the npm-minor group across 1 directory with 2 updates
dependabot[bot] Jul 29, 2026
3502f79
Bump ruby/setup-ruby
dependabot[bot] Jul 29, 2026
60a5791
Rebuild
github-actions[bot] Jul 29, 2026
82f035a
Update changelog and version after v4.37.4
github-actions[bot] Jul 30, 2026
06f1d4f
Rebuild
github-actions[bot] Jul 30, 2026
d0ee43a
Merge pull request #4057 from github/mergeback/v4.37.4-to-main-f205ea1c
oscarsj Jul 30, 2026
2e53f1c
Merge pull request #4056 from github/dependabot/github_actions/dot-gi…
mbg Jul 30, 2026
c5f739b
Merge branch 'main' into dependabot/npm_and_yarn/npm-minor-2032624187
mbg Jul 30, 2026
5d3eb98
Merge pull request #4055 from github/dependabot/npm_and_yarn/npm-mino…
mbg Jul 30, 2026
2d3b351
Handle network errors when streaming the CodeQL bundle download
Jul 30, 2026
155e522
Link the PR from the changelog entry
Jul 30, 2026
c29563e
ci: use federated enterprise release PAT
sam-robson Jul 31, 2026
68028fc
Merge pull request #4062 from github/sam-robson/migrate-enterprise-re…
sam-robson Jul 31, 2026
d2bfc30
Merge pull request #4050 from github/mbg/status/registries
mbg Jul 31, 2026
1cd4d01
Merge pull request #4061 from github/henrymercer/turbo-system
mbg Jul 31, 2026
e74600b
Update changelog for v4.37.5
github-actions[bot] Aug 3, 2026
d1ba80a
Merge pull request #4067 from github/update-v4.37.5-1cd4d01d5
henrymercer Aug 3, 2026
2c538e6
Revert "Update version and changelog for v3.37.4"
github-actions[bot] Aug 3, 2026
5667eab
Revert "Rebuild"
github-actions[bot] Aug 3, 2026
a7b3986
Merge remote-tracking branch 'origin/releases/v4' into backport-v3.37…
github-actions[bot] Aug 3, 2026
f44d029
Update version and changelog for v3.37.5
github-actions[bot] Aug 3, 2026
01b30f9
Rebuild
github-actions[bot] Aug 3, 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
Prev Previous commit
Next Next commit
Make ActionState available and add test
  • Loading branch information
mbg committed Jul 28, 2026
commit c7ae51bb2daea524f6967b00fec6cceaa7b607b5
2 changes: 1 addition & 1 deletion src/init-action.ts
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ async function run(
const repositoryProperties = repositoryPropertiesResult.orElse({});

// Create a unique identifier for this run.
getJobUUID(logger);
getJobUUID(actionState);

core.exportVariable(EnvVar.INIT_ACTION_HAS_RUN, "true");

Expand Down
4 changes: 2 additions & 2 deletions src/setup-codeql-action.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ async function sendCompletedStatusReport(

/** The main behaviour of this action. */
async function run(
actionState: ActionState<["Base", "Logger", "Actions"]>,
actionState: ActionState<["Base", "Logger", "Env", "Actions"]>,
): Promise<void> {
// To capture errors appropriately, keep as much code within the try-catch as
// possible, and only use safe functions outside.
Expand Down Expand Up @@ -141,7 +141,7 @@ async function run(
const actionStateWithFeatures = { ...actionState, features };

// Create a unique identifier for this run.
getJobUUID(logger);
getJobUUID(actionState);

const statusReportBase = await createStatusReportBase(
ActionName.SetupCodeQL,
Expand Down
9 changes: 9 additions & 0 deletions src/status-report.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import test from "ava";
import * as sinon from "sinon";
import * as uuid from "uuid";

import * as actionsUtil from "./actions-util";
import { Config } from "./config-utils";
Expand All @@ -12,6 +13,7 @@ import {
createInitWithConfigStatusReport,
createStatusReportBase,
getActionsStatus,
getJobUUID,
InitStatusReport,
InitWithConfigStatusReport,
} from "./status-report";
Expand All @@ -20,11 +22,18 @@ import {
setupActionsVars,
createTestConfig,
makeMacro,
callee,
} from "./testing-utils";
import { BuildMode, ConfigurationError, withTmpDir, wrapError } from "./util";

setupTests(test);

test("getJobUUID - generates valid UUIDs", async (t) => {
await callee(getJobUUID)
.withArgs()
.passes((val) => t.true(uuid.validate(val)));
});

function setupEnvironmentAndStub(tmpDir: string) {
setupActionsVars(tmpDir, tmpDir, {
GITHUB_EVENT_NAME: "dynamic",
Expand Down
5 changes: 3 additions & 2 deletions src/status-report.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import * as os from "os";
import * as core from "@actions/core";
import { v4 as uuidV4 } from "uuid";

import type { ActionState } from "./action-common";
import {
getWorkflowEventName,
getOptionalInput,
Expand Down Expand Up @@ -64,9 +65,9 @@ export function getDisplayActionName(actionName: ActionName): string {
* Creates a UUIDv4 for the analysis and returns it.
* The generated UUID is also exported as an environment variable.
*/
export function getJobUUID(logger: Logger) {
export function getJobUUID(action: ActionState<["Logger", "ReadOnlyEnv"]>) {
const jobRunUuid = uuidV4();
logger.info(`Job run UUID is ${jobRunUuid}.`);
action.logger.info(`Job run UUID is ${jobRunUuid}.`);

core.exportVariable(EnvVar.JOB_RUN_UUID, jobRunUuid);
return jobRunUuid;
Expand Down