Skip to content

Commit

Permalink
fix: trimming body to find commands
Browse files Browse the repository at this point in the history
  • Loading branch information
gentlementlegen committed Sep 9, 2024
1 parent 04d4e03 commit fd17b58
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/github/handlers/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ async function shouldSkipPlugin(event: EmitterWebhookEvent, context: GitHubConte
manifest?.commands &&
Object.keys(manifest.commands).length &&
!Object.keys(manifest.commands).some(
(command) => "comment" in context.payload && typeof context.payload.comment !== "string" && context.payload.comment?.body.startsWith(`/${command}`)
(command) => "comment" in context.payload && typeof context.payload.comment !== "string" && context.payload.comment?.body.trim().startsWith(`/${command}`)
)
) {
console.log(`Skipping plugin chain ${manifest.name} because command does not match.`, manifest.commands);
Expand Down

0 comments on commit fd17b58

Please sign in to comment.