diff --git a/src/fields.ts b/src/fields.ts index d0584a35..e0a56f60 100644 --- a/src/fields.ts +++ b/src/fields.ts @@ -73,6 +73,9 @@ export class FieldFactory { this.includes('workflow') ? createAttachment('workflow', await this.workflow()) : undefined, + this.includes('workflowRun') + ? createAttachment('workflow', await this.workflowRun()) + : undefined, this.includes('pullRequest') ? createAttachment('pullRequest', await this.pullRequest()) : undefined, @@ -214,6 +217,13 @@ export class FieldFactory { return value; } + private async workflowRun(): Promise { + const { owner, repo } = context.repo; + const value = `<${this.gitHubBaseUrl}/${owner}/${repo}/actions/runs/${context.runId}|${context.workflow}>`; + process.env.AS_WORKFLOW_RUN = value; + return value; + } + private async pullRequest(): Promise { let value; if (context.eventName.startsWith('pull_request')) {