Skip to content

Commit

Permalink
also consider @presubmit in the title
Browse files Browse the repository at this point in the history
  • Loading branch information
Bogdan Stanga committed Nov 18, 2024
1 parent f597f41 commit d67853e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 5 additions & 2 deletions src/pull_request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -154,8 +154,11 @@ export async function handlePullRequest() {
info(`generated pull request summary: ${summary.title}`);

// Update PR title if @presubmitai is mentioned in the title
if (pull_request.title.includes("@presubmitai")) {
info(`title contains @presubmitai, so generating a new title`);
if (
pull_request.title.includes("@presubmitai") ||
pull_request.title.includes("@presubmit")
) {
info(`title contains mention of presubmit.ai, so generating a new title`);
await octokit.rest.pulls.update({
...context.repo,
pull_number: pull_request.number,
Expand Down

0 comments on commit d67853e

Please sign in to comment.