From 01cfabf9c67d00ff6a8d519857f931a02b38de86 Mon Sep 17 00:00:00 2001 From: Alexandr Date: Wed, 6 Dec 2023 21:51:22 +0200 Subject: [PATCH] ci: add theme prs closer workflow --- .github/workflows/theme-prs-closer.yml | 27 ++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 .github/workflows/theme-prs-closer.yml diff --git a/.github/workflows/theme-prs-closer.yml b/.github/workflows/theme-prs-closer.yml new file mode 100644 index 00000000..5cff4d14 --- /dev/null +++ b/.github/workflows/theme-prs-closer.yml @@ -0,0 +1,27 @@ +name: Theme Pull Requests Closer + +on: + pull_request: + types: + - labeled + +jobs: + close-prs: + runs-on: ubuntu-latest + + steps: + - name: Check out the code + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + + - name: Set up Git + run: | + git config user.name "github-actions[bot]" + git config user.email "github-actions[bot]@users.noreply.github.com" + + - name: Close Pull Requests + run: | + comment_message="We are currently pausing addition of new themes. If this theme is exclusively for your personal use, then instead of adding it to our theme collection, you can use card customization options." + + for pr_number in $(gh pr list -l "themes" -q is:open --json number -q ".[].number"); do + gh pr close $pr_number -c "$comment_message" + done