Workflow/close failed prs (#6960)

* chore: add workflow to close stale PRs with failed workflows

* Include workflow failures when closing stale PRs

* Filter meaningful commits to only include those within the last 14 days
This commit is contained in:
Deniz Altunkapan
2025-11-03 23:26:10 +01:00
committed by GitHub
parent 100462d8e9
commit f0a437d08c

View File

@@ -59,11 +59,13 @@ jobs:
const meaningfulCommits = commits.filter(c => {
const msg = c.commit.message.toLowerCase();
const date = new Date(c.commit.committer.date);
const isMergeFromMain = mainBranches.some(branch =>
msg.startsWith(`merge branch '${branch}'`) ||
msg.includes(`merge remote-tracking branch '${branch}'`)
);
return !isMergeFromMain;
return !isMergeFromMain && date > cutoff;
});
// Get checks with error handling
@@ -151,4 +153,4 @@ jobs:
} catch (error) {
console.error(`❌ Fatal error: ${error.message}`);
throw error;
}
}