name: 'Close stale pull requests'
on:
  schedule:
    - cron: '0 3 * * *'

jobs:
  stale:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/stale@v4
        with:
          stale-pr-message: >
            There hasn't been any activity on this pull request in the past year, so
            it has been marked as stale and it will be closed automatically if no
            further activity occurs in the next 7 days.

            If you want to continue working on it, please leave a comment.

          close-pr-message: >
            This pull request was closed due to a year of no activity.

          days-before-stale:    -1
          days-before-pr-stale: 365
          days-before-pr-close: 7
