Skip to content

Commit

Permalink
feat: silence slack messages during quiet period
Browse files Browse the repository at this point in the history
  • Loading branch information
erickzhao committed Dec 4, 2023
1 parent b9c2f64 commit 35a2ea6
Show file tree
Hide file tree
Showing 3 changed files with 701 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,9 @@ export = (app: Probot) => {
const shouldReviewReadyAPIPR =
action === 'ready_for_review' && pr.labels.some(({ id }) => hasAPILabel(id));

if (shouldReviewReadyAPIPR || shouldReviewNewAPIPR) {
const isDecember = new Date(payload.pull_request.updated_at).getMonth() === 11;

if (!isDecember && (shouldReviewReadyAPIPR || shouldReviewNewAPIPR)) {
await postToSlack(pr);
}
});
Expand Down
Loading

0 comments on commit 35a2ea6

Please sign in to comment.