Skip to content

Commit

Permalink
Merge pull request #13 from r7kamura/mention
Browse files Browse the repository at this point in the history
Prevent mention on pull request body
  • Loading branch information
r7kamura authored May 30, 2024
2 parents b3f21f6 + 3fb56f9 commit bd74457
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ await createPullRequest({
owner: github.context.repo.owner,
repo: github.context.repo.repo,
title,
body: response.data.body,
body: preventMention(response.data.body),
head: branch,
base: github.context.ref,
});
Expand Down Expand Up @@ -121,3 +121,7 @@ async function createAndPushCommit({
await exec.exec("git", ["commit", "--message", message]);
await exec.exec("git", ["push", "--set-upstream", "origin", branch]);
}

function preventMention(text: string) {
return text.replace(/@/g, "@\u200B");
}

0 comments on commit bd74457

Please sign in to comment.