From faa0b0572a0cc8745598d8fa399c5a3ee5fb2b5b Mon Sep 17 00:00:00 2001 From: Steve Riesenberg Date: Wed, 6 Jul 2022 15:17:21 -0500 Subject: [PATCH] Update details to include link to workflow runs --- src/main.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main.ts b/src/main.ts index 62ce5647..2ad72374 100644 --- a/src/main.ts +++ b/src/main.ts @@ -155,10 +155,12 @@ async function main(): Promise { const repo_url = `<${workflow_run.repository.html_url}|*${workflow_run.repository.full_name}*>` const branch_url = `<${workflow_run.repository.html_url}/tree/${workflow_run.head_branch}|*${workflow_run.head_branch}*>` const workflow_run_url = `<${workflow_run.html_url}|#${workflow_run.run_number}>` + const workflow_runs_url = `<${workflow_run.repository.html_url}/${workflow_run.path.replace('.github', 'actions')}?query=branch%3A${workflow_run.head_branch}|${context.workflow}>`; + // Example: Success: AnthonyKinson's `push` on `master` for pull_request let status_string = `${workflow_msg} ${context.actor}'s \`${context.eventName}\` on \`${branch_url}\`` // Example: Workflow: My Workflow #14 completed in `1m 30s` - const details_string = `Workflow: ${context.workflow} ${workflow_run_url} completed in \`${workflow_duration}\`` + const details_string = `Workflow: ${workflow_runs_url} ${workflow_run_url} completed in \`${workflow_duration}\`` // Build Pull Request string if required const pull_requests = (workflow_run.pull_requests as PullRequest[])