Skip to content

Commit

Permalink
fix: missing parameter in merge message requirement check
Browse files Browse the repository at this point in the history
  • Loading branch information
gitcommitshow committed Jun 22, 2024
1 parent 40a138d commit 9e32e9d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ app.webhooks.on("pull_request.closed", async ({ octokit, payload }) => {
if (!payload.pull_request.merged) return;
console.log(`This PR is merged`);
try {
if (!isMessageAfterMergeRequired()) {
if (!isMessageAfterMergeRequired(payload.pull_request)) {
return;
}
console.log(`Going to notify the PR author...`);
Expand Down
2 changes: 1 addition & 1 deletion src/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export function isCLARequired(pullRequest) {
}

export function isMessageAfterMergeRequired(pullRequest) {
if (isABot(pullRequest.user)) {
if (isABot(pullRequest?.user)) {
console.log("This PR is from a bot. So no message after merge required.");
return false;
}
Expand Down

0 comments on commit 9e32e9d

Please sign in to comment.