Skip to content

fix(ci): align linked issue grace period with documented policy#2244

Merged
aceppaluni merged 1 commit into
hiero-ledger:mainfrom
ZainabTravadi:fix-linked-issue-grace-period
May 11, 2026
Merged

fix(ci): align linked issue grace period with documented policy#2244
aceppaluni merged 1 commit into
hiero-ledger:mainfrom
ZainabTravadi:fix-linked-issue-grace-period

Conversation

@ZainabTravadi

@ZainabTravadi ZainabTravadi commented May 6, 2026

Copy link
Copy Markdown
Contributor

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 24 so runtime behavior matches the documented policy.

Closes #2243

Copilot AI review requested due to automatic review settings May 6, 2026 13:49
@ZainabTravadi
ZainabTravadi requested review from a team as code owners May 6, 2026 13:49
@codacy-production

codacy-production Bot commented May 6, 2026

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 0 complexity

Metric Results
Complexity 0

View in Codacy

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.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@ZainabTravadi
ZainabTravadi force-pushed the fix-linked-issue-grace-period branch from 40566ca to eb3fa83 Compare May 6, 2026 13:51
@coderabbitai

coderabbitai Bot commented May 6, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Walkthrough

The enforcer's grace period was increased: the workflow and script default now use 24 hours (previously 12) before closing PRs without linked issues.

Changes

Linked Issue Enforcer Update

Layer / File(s) Summary
Script default
.github/scripts/cron-enforcer-pr-linked-issue.js
hoursBeforeClose fallback default changed from 12 to 24 hours.
Workflow comment and wiring
.github/workflows/cron-enforcer-pr-linked-issue.yml
Top comment updated to state a 1-day (24h) window; HOURS_BEFORE_CLOSE environment variable updated from "12" to "24" in the enforcement step.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: updating the linked issue grace period configuration to align with documented policy.
Description check ✅ Passed The description clearly explains the mismatch between documented policy and actual configuration, and how the change fixes it.
Linked Issues check ✅ Passed The PR addresses issue #2243 by updating HOURS_BEFORE_CLOSE from '12' to '24' in both workflow and script files, directly fixing the documented grace period mismatch.
Out of Scope Changes check ✅ Passed All changes are directly related to fixing the linked-issue enforcer grace period configuration; no out-of-scope modifications detected.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@Akshat8510

Akshat8510 commented May 6, 2026

Copy link
Copy Markdown
Member

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 (-S) and DCO signing (-s):
https://github.com/hiero-ledger/sdk-collaboration-hub/blob/main/guides/issue-progression/for-developers/signing.md

@exploreriii exploreriii added step: 1st 1st stage of the review approval process reviewer: community pull requests looking for community reviews labels May 6, 2026
@ZainabTravadi
ZainabTravadi force-pushed the fix-linked-issue-grace-period branch 2 times, most recently from 4a391c5 to ad9143c Compare May 6, 2026 19:48
@darshit2308

Copy link
Copy Markdown
Contributor

Hi @ZainabTravadi , good work on this !
I think that you missed few files, please fix these 2 files also
https://github.com/hiero-ledger/hiero-sdk-python/blob/main/.github/workflows/cron-enforcer-pr-linked-issue.yml
https://github.com/hiero-ledger/hiero-sdk-python/blob/main/.github/scripts/cron-enforcer-pr-linked-issue.js

I am providing the exact screenshots for exact locations.

Line 1 in cron-enforcer-pr-linked-issue.yml : (Change 3 days to 1 day)
image

Line 1 and 5 in cron-enforcer-pr-linked-issue.js :
image

Rest looks good to me.

@ZainabTravadi
ZainabTravadi force-pushed the fix-linked-issue-grace-period branch from ad9143c to 9d37d4a Compare May 7, 2026 11:00
@ZainabTravadi

Copy link
Copy Markdown
Contributor Author

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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

📥 Commits

Reviewing files that changed from the base of the PR and between 4a391c5 and 9d37d4a.

📒 Files selected for processing (2)
  • .github/scripts/cron-enforcer-pr-linked-issue.js
  • .github/workflows/cron-enforcer-pr-linked-issue.yml

Comment thread .github/scripts/cron-enforcer-pr-linked-issue.js
Comment thread .github/workflows/cron-enforcer-pr-linked-issue.yml
@github-actions github-actions Bot added Good First Issue Issues which are ideal for a first time or new project contributor. queue:junior-committer PR awaiting initial quality review labels May 7, 2026
@exploreriii exploreriii removed the step: 1st 1st stage of the review approval process label May 8, 2026
@exploreriii exploreriii removed the reviewer: community pull requests looking for community reviews label May 8, 2026
@github-actions github-actions Bot added queue:maintainers PR awaiting maintainer final review open to community review PR is open for community review and feedback queue:committers PR awaiting committer technical review and removed queue:junior-committer PR awaiting initial quality review queue:maintainers PR awaiting maintainer final review labels May 8, 2026
@aceppaluni

Copy link
Copy Markdown
Contributor

@ZainabTravadi Please be sure to update your branch so we can merge, thank you!!

@aceppaluni aceppaluni added step: merge ready PR is ready and waiting to merge status: update branch developer needs to click update branch labels May 11, 2026
@github-actions github-actions Bot added status: ready-to-merge PR has 1+ maintainer and 2+ total approvals, ready to merge and removed queue:committers PR awaiting committer technical review labels May 11, 2026
Signed-off-by: Zainab Travadi <zainabtravadi421@gmail.com>
@ZainabTravadi
ZainabTravadi force-pushed the fix-linked-issue-grace-period branch from 9d37d4a to cc5d39b Compare May 11, 2026 16:26

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

♻️ Duplicate comments (4)
.github/scripts/cron-enforcer-pr-linked-issue.js (2)

1-1: ⚠️ Potential issue | 🔴 Critical | ⚡ Quick win

The documented policy is 3 days (72 hours), not 1 day (24 hours).

Issue #2243 explicitly 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 use 72 to align with the documented policy, not 24.

🐛 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 closesthat automatically closes).


5-5: ⚠️ Potential issue | 🔴 Critical | ⚡ Quick win

Fallback 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 win

Comment 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 #2243 explicitly 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

📥 Commits

Reviewing files that changed from the base of the PR and between 9d37d4a and cc5d39b.

📒 Files selected for processing (2)
  • .github/scripts/cron-enforcer-pr-linked-issue.js
  • .github/workflows/cron-enforcer-pr-linked-issue.yml

@aceppaluni
aceppaluni merged commit ec557e8 into hiero-ledger:main May 11, 2026
13 checks passed
NssGourav pushed a commit to NssGourav/hiero-sdk-python that referenced this pull request May 14, 2026
…o-ledger#2244)

Signed-off-by: Zainab Travadi <zainabtravadi421@gmail.com>
@exploreriii exploreriii added this to the v0.2.7 milestone May 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Good First Issue Issues which are ideal for a first time or new project contributor. open to community review PR is open for community review and feedback status: ready-to-merge PR has 1+ maintainer and 2+ total approvals, ready to merge status: update branch developer needs to click update branch step: merge ready PR is ready and waiting to merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Linked issue enforcer workflow closes PRs earlier than documented grace period

6 participants