Skip to content

Commit e3c1418

Browse files
committed
feat: implement Linked Issue Enforcer to automatically close PRs without linked issues
Signed-off-by: MonaaEid <[email protected]>
1 parent 11967db commit e3c1418

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

.github/scripts/linked_issue_enforce.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ const daysBeforeClose = parseInt(process.env.DAYS_BEFORE_CLOSE || '3', 10);
66
const requireAuthorAssigned = (process.env.REQUIRE_AUTHOR_ASSIGNED || 'true').toLowerCase() === 'true';
77

88
const getDaysOpen = (pr) =>
9-
Math.floor((Date.now() - new Date(pr.created_at)) / 86400000);
9+
Math.floor((Date.now() - new Date(pr.created_at)) / (24 * 60 * 60 * 1000));
1010

1111
// Check if the PR author is assigned to the issue
1212
const isAuthorAssigned = (issue, login) => {

0 commit comments

Comments
 (0)