Skip to content

Commit

Permalink
Only comment on translation changes if the PR is targeting main (#92)
Browse files Browse the repository at this point in the history
Locale backports are appropriate

Signed-off-by: Yarden Shoham <git@yardenshoham.com>
  • Loading branch information
yardenshoham committed Jul 4, 2023
1 parent c959457 commit 9d02895
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/webhook.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,11 @@ webhook.on("pull_request.opened", () => {
labels.run();
});

// on pull request open, comment if translations changed
// on pull request open, comment if translations changed (only if the PR is targeting main)
webhook.on("pull_request.opened", ({ payload }) => {
if (payload.pull_request.base.ref !== "main") {
return;
}
comments.commentIfTranslationsChanged(payload.pull_request);
});

Expand Down

0 comments on commit 9d02895

Please sign in to comment.