Add Api to ActionState

This commit is contained in:
Michael B. Gale
2026-07-13 16:55:44 +01:00
parent 1542951d09
commit 2dbfdcaa83
2 changed files with 15 additions and 2 deletions

View File

@@ -193,7 +193,14 @@ export function getTestActionsEnv(): ActionsEnv {
}
/** For testing purposes, we make all available state features accessible in `TestEnv`. */
type AllState = ["Logger", "Env", "ReadOnlyEnv", "Actions", "FeatureFlags"];
type AllState = [
"Logger",
"Env",
"ReadOnlyEnv",
"Actions",
"Api",
"FeatureFlags",
];
/** Initialise a fresh `ActionState<AllState>` value. */
export function initAllState(
@@ -205,6 +212,7 @@ export function initAllState(
logger: new RecordingLogger(),
env: getTestEnv(),
actions: getTestActionsEnv(),
apiClient: github.getOctokit("123"),
features: createFeatures([]),
...overrides,
};