fix(ci): align linked issue grace period with documented policy#2244
Conversation
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 0 |
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
There was a problem hiding this comment.
Pull request overview
Aligns the “Linked Issue Enforcer” GitHub Actions workflow behavior with the documented 3-day grace period before closing PRs that don’t link an issue, addressing the mismatch reported in #2243.
Changes:
- Updates the workflow configuration to pass
HOURS_BEFORE_CLOSE: "72"(3 days) to the enforcement script instead of"12".
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
40566ca to
eb3fa83
Compare
WalkthroughThe enforcer's grace period was increased: the workflow and script default now use 24 hours (previously 12) before closing PRs without linked issues. ChangesLinked Issue Enforcer Update
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Tip 💬 Introducing Slack Agent: The best way for teams to turn conversations into code.Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.
Built for teams:
One agent for your entire SDLC. Right inside Slack. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Hi @ZainabTravadi, thanks for the contribution! I noticed the Verified Signature check is failing. Since this is your first contribution, this guide may help with setting up both GPG signing ( |
4a391c5 to
ad9143c
Compare
|
Hi @ZainabTravadi , good work on this ! I am providing the exact screenshots for exact locations. Line 1 in cron-enforcer-pr-linked-issue.yml : (Change 3 days to 1 day) Line 1 and 5 in cron-enforcer-pr-linked-issue.js : Rest looks good to me. |
ad9143c to
9d37d4a
Compare
|
Thanks for catching that! You're right — I updated the workflow env value but missed the related comments/defaults in the workflow + script. I’ll align those as well so the behavior and messaging stay fully consistent. |
There was a problem hiding this comment.
Actionable comments posted: 2
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
Run ID: 4f5fb194-3596-4ebb-b71f-870b40ed629e
📒 Files selected for processing (2)
.github/scripts/cron-enforcer-pr-linked-issue.js.github/workflows/cron-enforcer-pr-linked-issue.yml
|
@ZainabTravadi Please be sure to update your branch so we can merge, thank you!! |
Signed-off-by: Zainab Travadi <zainabtravadi421@gmail.com>
9d37d4a to
cc5d39b
Compare
There was a problem hiding this comment.
♻️ Duplicate comments (4)
.github/scripts/cron-enforcer-pr-linked-issue.js (2)
1-1:⚠️ Potential issue | 🔴 Critical | ⚡ Quick winThe documented policy is 3 days (72 hours), not 1 day (24 hours).
Issue
#2243explicitly states the documented grace period is 3 days (72 hours). The PR objectives confirm: "workflow messaging states a 3-day (72-hour) grace period". This comment and the fallback default on line 5 must use72to align with the documented policy, not24.🐛 Proposed fix
-// A script to closes pull requests without a linked issue after 24 hours automatically. +// A script that automatically closes pull requests without a linked issue after 72 hours.The diff also fixes the typo (
to closes→that automatically closes).
5-5:⚠️ Potential issue | 🔴 Critical | ⚡ Quick winFallback default must match the documented 72-hour grace period.
The fallback should be
'72'to match the documented 3-day policy stated in issue#2243, not'24'.🐛 Proposed fix
-const hoursBeforeClose = parseInt(process.env.HOURS_BEFORE_CLOSE || '24', 10); +const hoursBeforeClose = parseInt(process.env.HOURS_BEFORE_CLOSE || '72', 10);.github/workflows/cron-enforcer-pr-linked-issue.yml (2)
1-1:⚠️ Potential issue | 🔴 Critical | ⚡ Quick winComment contradicts the documented 3-day grace period from issue
#2243.The linked issue states the documented policy is 3 days, not 1 day. This comment should read "after 3 days" to align with the documented policy.
🐛 Proposed fix
-# This workflow automatically closes pull requests without a linked issue after 1 day. +# This workflow automatically closes pull requests without a linked issue after 3 days.
36-36:⚠️ Potential issue | 🔴 Critical | ⚡ Quick win
HOURS_BEFORE_CLOSE: "24"contradicts the documented 3-day (72-hour) policy.Issue
#2243explicitly states: "workflow messaging states a 3-day (72-hour) grace period". The PR objective is to align enforcement with this documented policy, yet the implementation sets the value to"24"(1 day) instead of"72"(3 days). This undermines the stated goal of the PR.🐛 Proposed fix
- HOURS_BEFORE_CLOSE: "24" + HOURS_BEFORE_CLOSE: "72"
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
Run ID: 5384523f-4e5f-41c2-98ea-9138af24fa47
📒 Files selected for processing (2)
.github/scripts/cron-enforcer-pr-linked-issue.js.github/workflows/cron-enforcer-pr-linked-issue.yml
…o-ledger#2244) Signed-off-by: Zainab Travadi <zainabtravadi421@gmail.com>


Summary
Align the linked-issue enforcer workflow configuration with the documented 1-day grace period.
The workflow currently states that PRs without linked issues are automatically closed after 3 days, but the workflow passes
HOURS_BEFORE_CLOSE: "12"to the enforcement script, causing PRs to potentially close after 12 hours instead.This change updates the workflow env value to
24so runtime behavior matches the documented policy.Closes #2243