Skip to content

Commit

Permalink
Merge pull request ubiquity-os#91 from gentlementlegen/fix/command-skip
Browse files Browse the repository at this point in the history
fix: command skip
  • Loading branch information
gentlementlegen authored Aug 24, 2024
2 parents d7658a3 + 4c4b79c commit c91cce2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Binary file modified bun.lockb
Binary file not shown.
6 changes: 3 additions & 3 deletions src/github/handlers/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,13 @@ async function shouldSkipPlugin(event: EmitterWebhookEvent, context: GitHubConte
const manifest = await getManifest(context, pluginChain.uses[0].plugin);
if (
context.key === "issue_comment.created" &&
manifest &&
manifest.commands &&
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}`)
)
) {
console.log(`Skipping plugin chain ${manifest.name} because command does not match`);
console.log(`Skipping plugin chain ${manifest.name} because command does not match.`, manifest.commands);
return true;
}
return false;
Expand Down

0 comments on commit c91cce2

Please sign in to comment.