Skip to content

Commit a2dda1e

Browse files
authored
feat: Show footer links if isDebug (#356)
1 parent aeecebc commit a2dda1e

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/main.ts

+6-1
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,12 @@ export async function run(): Promise<void> {
142142
`<a href="https://github.com/peaceiris/actions-label-commenter#readme">Bot Usage</a>` +
143143
`</div>\n` +
144144
'\n<!-- peaceiris/actions-label-commenter -->\n';
145-
const rawCommentBody = `${commentHeader}\n\n${commentMain}\n\n${commentFooter}\n\n${commentFooterLinks}`;
145+
const rawCommentBody = (() => {
146+
if (core.isDebug()) {
147+
return `${commentHeader}\n\n${commentMain}\n\n${commentFooter}\n\n${commentFooterLinks}`;
148+
}
149+
return `${commentHeader}\n\n${commentMain}\n\n${commentFooter}`;
150+
})();
146151

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

0 commit comments

Comments
 (0)