diff --git a/.github/workflows/README.md b/.github/workflows/README.md index b6348eae93..fa5f5ccb7c 100644 --- a/.github/workflows/README.md +++ b/.github/workflows/README.md @@ -11,6 +11,7 @@ | release.yaml | Build images, cli-binaries, provenances, and post actions | | scorecard.yaml | Generate scorecard for supply-chain security | | update-snyk.yaml | Scheduled snyk reports | +| stale.yaml | Labels stale issues and PRs | # Reusable workflows diff --git a/.github/workflows/stale.yaml b/.github/workflows/stale.yaml new file mode 100644 index 0000000000..3a5259c16b --- /dev/null +++ b/.github/workflows/stale.yaml @@ -0,0 +1,31 @@ +name: "Label stale issues and PRs" +on: + schedule: + - cron: "0 0 * * *" #Runs midnight 12AM UTC + +#Added Recommended permissions +permissions: + issues: write + pull-requests: write + +jobs: + stale: + runs-on: ubuntu-24.04 + steps: + - uses: actions/stale@997185467fa4f803885201cee163a9f38240193d # v10.1.1 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + + stale-issue-message: > + This issue has been marked as stale because it has had no activity for 90 days. Please comment if this is still relevant. + + stale-pr-message: > + This pull request has been marked as stale because it has had no activity for 90 days. Please comment if this is still relevant. + + days-before-stale: 90 + days-before-close: -1 # Auto-close diabled + + exempt-issue-labels: > + bug, security, breaking/high, breaking/medium, breaking/low + + operations-per-run: 200