From cc765868c1ed5f2da0debcf6069c5c7c68076759 Mon Sep 17 00:00:00 2001 From: Jacob Scott Date: Tue, 17 Oct 2023 16:46:02 +0100 Subject: [PATCH] Create remove-stale-branches.yml --- .github/workflows/remove-stale-branches.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 .github/workflows/remove-stale-branches.yml diff --git a/.github/workflows/remove-stale-branches.yml b/.github/workflows/remove-stale-branches.yml new file mode 100644 index 0000000..25dd1b9 --- /dev/null +++ b/.github/workflows/remove-stale-branches.yml @@ -0,0 +1,19 @@ +name: 'Remove stale branches' +on: + schedule: + - cron: '0 0 * * 1-5' + +jobs: + remove-stale-branches: + name: Remove stale branches + runs-on: ubuntu-latest + steps: + - uses: fpicalausa/remove-stale-branches@v1.5.8 + with: + dry-run: true + days-before-branch-stale: 30 + days-before-branch-delete: 14 + stale-branch-message: "@{author} The branch [{branchName}]({branchUrl}) hasn't been updated in the last 30 days and is marked as stale. It will be removed in 14 days.\r\nIf you want to keep this branch around, delete this comment or add new commits to this branch." + exempt-protected-branches: true + exempt-branches-regex: "^(release\\/|feature\\/|poc\\/).*" + operations-per-run: 30