Skip to content

Commit

Permalink
chore: @UbiquityOS at string start to call
Browse files Browse the repository at this point in the history
  • Loading branch information
Keyrxng committed Oct 27, 2024
1 parent 9dddbf4 commit 327a78e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/handlers/comment-created-callback.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export async function issueCommentCreatedCallback(
env: { UBIQUITY_OS_APP_NAME },
} = context;
const question = context.payload.comment.body.trim();
const slugRegex = new RegExp(`@${UBIQUITY_OS_APP_NAME}`, "gi");
const slugRegex = new RegExp(`^@${UBIQUITY_OS_APP_NAME}`, "i");

if (!slugRegex.test(question)) {
return { status: 204, reason: logger.info("Comment does not mention the app. Skipping.").logMessage.raw };
Expand Down

0 comments on commit 327a78e

Please sign in to comment.