Skip to content

Commit

Permalink
fix: force-push comment missing message
Browse files Browse the repository at this point in the history
  • Loading branch information
christophehurpeau committed Sep 6, 2022
1 parent 19c1928 commit fb6a6f7
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/events/pr-handlers/push.ts
Expand Up @@ -71,12 +71,16 @@ export default function status(app: Probot, appContext: AppContext): void {
}
}

if (!isClosedPr && hasReviewStarted) {
if (
!isClosedPr &&
hasReviewStarted &&
repoContext.config.warnOnForcePushAfterReviewStarted
) {
await context.octokit.issues.createComment(
context.repo({
issue_number: pullRequest.number,
body: `${login ? `@${login} ` : ''}: ${
repoContext.config.warnOnForcePushAfterReviewStarted
repoContext.config.warnOnForcePushAfterReviewStarted.message
}`,
}),
);
Expand Down

0 comments on commit fb6a6f7

Please sign in to comment.