chore: deprecating the token that's passed through to the context and using ctx.secrets.backstageToken instead
Signed-off-by: blam <ben@blam.sh>
This commit is contained in:
@@ -35,8 +35,12 @@ export type ActionContext<Input extends InputBase> = {
|
||||
|
||||
/**
|
||||
* User token forwarded from initial request, for use in subsequent api requests
|
||||
* @deprecated use `secrets.backstageToken` instead
|
||||
*/
|
||||
token?: string | undefined;
|
||||
|
||||
secrets?: TaskSecrets;
|
||||
|
||||
workspacePath: string;
|
||||
input: Input;
|
||||
output(name: string, value: JsonValue): void;
|
||||
|
||||
@@ -236,7 +236,9 @@ export class HandlebarsWorkflowRunner implements WorkflowRunner {
|
||||
logger: taskLogger,
|
||||
logStream: stream,
|
||||
input,
|
||||
// this token is deprecated, and will be removed in favour of secrets.backstageToken instead.
|
||||
token: task.secrets?.token,
|
||||
secrets: task.secrets ?? {},
|
||||
workspacePath,
|
||||
async createTemporaryDirectory() {
|
||||
const tmpDir = await fs.mkdtemp(
|
||||
|
||||
@@ -257,7 +257,9 @@ export class NunjucksWorkflowRunner implements WorkflowRunner {
|
||||
await action.handler({
|
||||
baseUrl: task.spec.baseUrl,
|
||||
input,
|
||||
// this token is deprecated, and will be removed in favour of secrets.backstageToken instead.
|
||||
token: task.secrets?.token,
|
||||
secrets: task.secrets ?? {},
|
||||
logger: taskLogger,
|
||||
logStream: streamLogger,
|
||||
workspacePath,
|
||||
|
||||
Reference in New Issue
Block a user