Skip to content

Commit e9b6551

Browse files
authored
dont show empty arguments (#2171)
Avoid the extra space in this output: ``` Handling command /submit with argument at git/git#2234 (comment) ``` as in here when just running `/submit`: https://github.com/gitgitgadget-workflows/gitgitgadget-workflows/actions/runs/23004209654/job/66796393071
2 parents 32e7aab + ab22a9b commit e9b6551

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/ci-helper.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -858,9 +858,9 @@ export class CIHelper {
858858
const pullRequestURL = `https://github.com/${repositoryOwner}/${
859859
this.config.repo.name
860860
}/pull/${comment.prNumber}`;
861-
console.log(
862-
`Handling command ${command} with argument ${argument} at ${pullRequestURL}#issuecomment-${commentID}`,
863-
);
861+
const arg = argument ? ` with argument ${argument}` : "";
862+
const at = `${pullRequestURL}#issuecomment-${commentID}`;
863+
console.log(`Handling command ${command}${arg} at ${at}`);
864864

865865
const addComment = async (body: string): Promise<void> => {
866866
const redacted = CIHelper.redactGitHubToken(body);

0 commit comments

Comments
 (0)