Skip to content

Commit 5fa9eee

Browse files
Filter meaningful commits to only include those within the last 14 days
1 parent d69c1db commit 5fa9eee

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

.github/workflows/close-failed-prs.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,12 +58,14 @@ jobs:
5858
});
5959
6060
const meaningfulCommits = commits.filter(c => {
61-
const msg = c.commit.message.toLowerCase();
62-
const isMergeFromMain = mainBranches.some(branch =>
63-
msg.startsWith(`merge branch '${branch}'`) ||
64-
msg.includes(`merge remote-tracking branch '${branch}'`)
61+
const msg = c.commit.message.toLowerCase();
62+
const date = new Date(c.commit.committer.date); // Commit-Datum
63+
const isMergeFromMain = mainBranches.some(branch =>
64+
msg.startsWith(`merge branch '${branch}'`) ||
65+
msg.includes(`merge remote-tracking branch '${branch}'`)
6566
);
66-
return !isMergeFromMain;
67+
68+
return !isMergeFromMain && date > cutoff;
6769
});
6870
6971
// Get checks with error handling

0 commit comments

Comments
 (0)