Skip to content

Commit 5b430da

Browse files
authored
UPdated the merge conflict notifier (JhaSourav07#2080)
## Description I had update the the GitHub Actions Merge Conflict Notifier to reduce notification spam. The bot will now only send a reminder comment once every 24 hours instead of every 2 hours Fixes JhaSourav07#1998 ## Pillar - [ ] 🎨 Pillar 1 — New Theme Design - [ ] 📐 Pillar 2 — Geometric SVG Improvement - [ ] 🕐 Pillar 3 — Timezone Logic Optimization - [x] 🛠️ Other (Bug fix, refactoring, docs) ## Checklist before requesting a review: - [x] I have read the `CONTRIBUTING.md` file. - [ ] I have tested these changes locally (`localhost:3000/api/streak?user=YOUR_USERNAME`). - [x] I have run `npm run format` and `npm run lint` locally and resolved all errors (CI will fail otherwise). - [x] My commits follow the Conventional Commits format (e.g., `feat(themes): ...`, `fix(calculate): ...`). - [ ] I have updated `README.md` if I added a new theme or URL parameter. - [x] I have started the repo. - [x] I have made sure that i have only one commit to merge in this PR. - [ ] The SVG output matches the CommitPulse "premium quality" aesthetic standard (no raw elements, smooth animations, correct fonts). - [x] (Recommended) I joined the CommitPulse Discord community for contributor discussions, mentorship, and faster PR support.
2 parents 4960e6c + 266f4da commit 5b430da

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

.github/workflows/conflict-notifier.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ jobs:
8181
});
8282
}
8383
84-
// Check existing comments to enforce a 2-hour notification gap
84+
// Check existing comments to enforce a 24-hour notification gap
8585
const { data: comments } = await github.rest.issues.listComments({
8686
owner: context.repo.owner,
8787
repo: context.repo.repo,
@@ -101,8 +101,8 @@ jobs:
101101
const lastComment = conflictComments[conflictComments.length - 1];
102102
const lastCommentTime = new Date(lastComment.created_at).getTime();
103103
const nowTime = new Date().getTime();
104-
const TWO_HOURS_MS = 2 * 60 * 60 * 1000;
105-
if (nowTime - lastCommentTime >= TWO_HOURS_MS) {
104+
const TWENTY_FOUR_HOURS_MS = 24 * 60 * 60 * 1000;
105+
if (nowTime - lastCommentTime >= TWENTY_FOUR_HOURS_MS) {
106106
shouldComment = true;
107107
}
108108
}

0 commit comments

Comments
 (0)