diff --git a/.github/workflows/close-stale.yml b/.github/workflows/close-stale.yml index d07e7e555c..219bdabc7c 100644 --- a/.github/workflows/close-stale.yml +++ b/.github/workflows/close-stale.yml @@ -1,4 +1,4 @@ -name: 'Close stale issues and PRs' +name: 'Close stale issues, branches and PRs' on: schedule: - cron: '30 1 * * *' @@ -8,7 +8,7 @@ on: - '.github/workflows/close-stale.yml' jobs: - stale: + stale-prs: runs-on: ubuntu-latest steps: - uses: actions/stale@v8 @@ -19,3 +19,13 @@ jobs: days-before-pr-stale: 14 days-before-close: 5 repo-token: ${{ secrets.GITHUB_TOKEN }} + stale-branches: + name: Remove Stale Branches + runs-on: ubuntu-latest + steps: + - uses: fpicalausa/remove-stale-branches@v1 + with: + operations-per-run: 50 + days-before-branch-delete: 3 + # yamllint disable-line + stale-branch-message: "@{author} Your branch [{branchName}]({branchUrl}) hasn't been updated in the last 60 days and is marked as stale. It will be removed in a week. If a pull request is open on this branch, you can ignore this message, you can always restore your branch on the pull request link. \r\nIf you want to keep this branch around, delete this comment or add new commits to this branch. "