Skip to content

Commit

Permalink
Add stalebot to label/close stale PRs and issues (#1288)
Browse files Browse the repository at this point in the history
As Cosmos grows in popularity, it is important that we automate a few
actions:
- labelling issues as stale
- labelling PRs as stale
- closing stale PRs

The goal of this PR is to accomplish this. As a starting point, my
suggestion is that we don't mark issues as stale, but I'm open to
changing this.

An example of a successful run:

https://github.com/astronomer/astronomer-cosmos/actions/runs/11590467421/job/32268097259
  • Loading branch information
tatiana authored Oct 30, 2024
1 parent 6bee880 commit ae94975
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/stale.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Handle stale issues and PRs
on:
schedule:
- cron: "0 11 * * *"
jobs:
handle-stale:
runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write
steps:
- uses: actions/stale@v9
with:
days-before-issue-stale: 30
days-before-issue-close: -1 # Never closes issues, more information in https://github.com/actions/stale/
stale-issue-label: "stale"
stale-issue-message: "This issue is stale because it has been open for 30 days with no activity."
days-before-pr-stale: 30
days-before-pr-close: 10
stale-pr-label: "stale"
stale-pr-message: "This PR is stale because it has been open for 30 days with no activity."
close-pr-message: "This PR was closed because it has been inactive for 10 days since being marked as stale."
repo-token: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit ae94975

Please sign in to comment.