mirror of
https://github.com/github/codeql-action.git
synced 2026-10-21 02:01:27 +00:00
Add getState to ActionsEnv
This commit is contained in:
3
lib/entry-points.js
generated
3
lib/entry-points.js
generated
@@ -170133,7 +170133,8 @@ function getActionsEnv() {
|
||||
return {
|
||||
getRequiredInput,
|
||||
getOptionalInput,
|
||||
setFailed: core4.setFailed
|
||||
setFailed: core4.setFailed,
|
||||
getState: core4.getState
|
||||
};
|
||||
}
|
||||
var getRequiredInput = function(name) {
|
||||
|
||||
@@ -31,6 +31,7 @@ export interface ActionsEnv {
|
||||
getRequiredInput: (name: string) => string;
|
||||
getOptionalInput: (name: string) => string | undefined;
|
||||
setFailed: (message: string) => void;
|
||||
getState: (name: string) => string;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -41,6 +42,7 @@ export function getActionsEnv(): ActionsEnv {
|
||||
getRequiredInput,
|
||||
getOptionalInput,
|
||||
setFailed: core.setFailed,
|
||||
getState: core.getState,
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -255,6 +255,10 @@ class TestActionsEnv implements ActionsEnv {
|
||||
get hasFailed() {
|
||||
return this.failed;
|
||||
}
|
||||
|
||||
public getState(name: string): string {
|
||||
throw new Error(`State '${name}' requested but not set.`);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user