From a12bd0bb712daa2e735634a039679da756793813 Mon Sep 17 00:00:00 2001 From: Jacob Scott Date: Tue, 17 Oct 2023 13:33:21 +0100 Subject: [PATCH] Create workflow remove-stale-branches.yml --- .github/workflows/remove-stale-branches.yml | 23 +++++++++++++++++++++ 1 file changed, 23 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 0000000000..b50cac6171 --- /dev/null +++ b/.github/workflows/remove-stale-branches.yml @@ -0,0 +1,23 @@ +on: + workflow_dispatch: # this will eventually be a cron job - for now it is used in manual testing + inputs: + days_before_stale: + type: number + default: 30 + days_before_delete: + type: number + default: 14 + +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: ${{ inputs.days_before_stale }} + days-before-branch-delete: ${{ inputs.days_before_delete }} + 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\\/).*"