|
| 1 | +name:Theme Pull Requests Closer |
| 2 | + |
| 3 | +on: |
| 4 | +pull_request: |
| 5 | +types: |
| 6 | + -labeled |
| 7 | + |
| 8 | +jobs: |
| 9 | +close-prs: |
| 10 | +runs-on:ubuntu-latest |
| 11 | + |
| 12 | +steps: |
| 13 | + -name:Check out the code |
| 14 | +uses:actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11# v4.1.1 |
| 15 | + |
| 16 | + -name:Set up Git |
| 17 | +run:| |
| 18 | + git config user.name "github-actions[bot]" |
| 19 | + git config user.email "github-actions[bot]@users.noreply.github.com" |
| 20 | +
|
| 21 | + -name:Close Pull Requests |
| 22 | +run:| |
| 23 | + 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." |
| 24 | +
|
| 25 | + for pr_number in $(gh pr list -l "themes" -q is:open --json number -q ".[].number"); do |
| 26 | + gh pr close $pr_number -c "$comment_message" |
| 27 | + done |