Skip to content

Commit

Permalink
feat: Show footer links if isDebug (#356)
Browse files Browse the repository at this point in the history
  • Loading branch information
peaceiris authored Dec 20, 2020
1 parent aeecebc commit a2dda1e
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,12 @@ export async function run(): Promise<void> {
`<a href="https://github.com/peaceiris/actions-label-commenter#readme">Bot Usage</a>` +
`</div>\n` +
'\n<!-- peaceiris/actions-label-commenter -->\n';
const rawCommentBody = `${commentHeader}\n\n${commentMain}\n\n${commentFooter}\n\n${commentFooterLinks}`;
const rawCommentBody = (() => {
if (core.isDebug()) {
return `${commentHeader}\n\n${commentMain}\n\n${commentFooter}\n\n${commentFooterLinks}`;
}
return `${commentHeader}\n\n${commentMain}\n\n${commentFooter}`;
})();

if (commentMain === '' || commentMain === void 0) {
core.info(`[INFO] no configuration ${parentFieldName}.body`);
Expand Down

0 comments on commit a2dda1e

Please sign in to comment.