Skip to content

Commit

Permalink
feat(api): append the source job name in summary
Browse files Browse the repository at this point in the history
  • Loading branch information
clearloop committed May 31, 2024
1 parent 4b516a1 commit 2edca8b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ export default class Api {
status: 'in_progress',
output: {
title: name,
summary: `Forked from ${run.html_url}\nRe-run the job ${sourceHtml()} to re-trigger this check.`
summary: `Forked from ${run.html_url}\nRe-run the \`${github.context.job}\` job in ${sourceHtml()} to re-trigger this check.`
},
head_sha
});
Expand Down
3 changes: 2 additions & 1 deletion src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,5 +91,6 @@ function deriveInputs(): IInputsAndJobs {

export function sourceHtml(): string {
const context = github.context;
return `${context.serverUrl}/${context.repo.owner}/${context.repo.repo}/actions/runs/${context.runId}/jobs/${context.job}`;

return `${context.serverUrl}/${context.repo.owner}/${context.repo.repo}/actions/runs/${context.runId}`;
}

0 comments on commit 2edca8b

Please sign in to comment.