Skip to content

Commit

Permalink
feat: Add footer links to log and usage (#316)
Browse files Browse the repository at this point in the history
  • Loading branch information
peaceiris committed Nov 24, 2020
1 parent ec45978 commit e46339b
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,15 @@ export async function run(): Promise<void> {
}
}

const commentBody = config.labels[labelIndex][`${labelEvent}`][`${eventType}`].body;
const logURL = `${process.env['GITHUB_SERVER_URL']}/${process.env['GITHUB_REPOSITORY']}/actions/runs/${process.env['GITHUB_RUN_ID']}`;
const commentBody =
config.labels[labelIndex][`${labelEvent}`][`${eventType}`].body +
`\n<div align="right">` +
`<a href="${logURL}">Log</a>` +
` | ` +
`<a href="https://github.com/peaceiris/actions-label-commenter#readme">Bot Usage</a>` +
`</div>\n` +
'\n<!-- peaceiris/actions-label-commenter -->\n';
const finalAction = config.labels[labelIndex][`${labelEvent}`][`${eventType}`].action;
core.info(`\
[INFO] commentBody: ${commentBody}
Expand Down

0 comments on commit e46339b

Please sign in to comment.