Close stale theme pull requests that have the 'invalid' label. #46
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Close stale theme pull requests that have the 'invalid' label. | |
on: | |
schedule: | |
# ┌───────────── minute (0 - 59) | |
# │ ┌───────────── hour (0 - 23) | |
# │ │ ┌───────────── day of the month (1 - 31) | |
# │ │ │ ┌───────────── month (1 - 12 or JAN-DEC) | |
# │ │ │ │ ┌───────────── day of the week (0 - 6 or SUN-SAT) | |
# │ │ │ │ │ | |
# │ │ │ │ │ | |
# │ │ │ │ │ | |
# * * * * * | |
- cron: "0 0 */7 * *" | |
permissions: | |
actions: read | |
checks: read | |
contents: read | |
deployments: read | |
issues: read | |
discussions: read | |
packages: read | |
pages: read | |
pull-requests: write | |
repository-projects: read | |
security-events: read | |
statuses: read | |
jobs: | |
closeOldThemePrs: | |
if: github.repository == 'anuraghazra/github-readme-stats' | |
name: Close stale 'invalid' theme PRs | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [18.x] | |
steps: | |
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | |
- name: Setup Node | |
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2 | |
with: | |
node-version: ${{ matrix.node-version }} | |
cache: npm | |
- uses: bahmutov/npm-install@237ded403e6012a48281f4572eab0c8eafe55b3f # v1.10.1 | |
with: | |
useLockFile: false | |
- run: npm run close-stale-theme-prs | |
env: | |
STALE_DAYS: 20 | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |