Skip to content

Commit 106fc6d

Browse files
chore(deps): auto-close optional dependabot PRs
1 parent 4c5d377 commit 106fc6d

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: Close Optional Upgrades PR
2+
3+
on:
4+
pull_request:
5+
types: [opened, synchronize, reopened]
6+
7+
jobs:
8+
auto-close:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Check PR branch name
12+
if: contains(github.head_ref, 'ignore-me-optional-upgrades')
13+
run: |
14+
echo "Branch name matched: ${GITHUB_HEAD_REF}"
15+
curl -s -X PATCH \
16+
-H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
17+
-H "Accept: application/vnd.github.v3+json" \
18+
https://api.github.com/repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }} \
19+
-d '{"state":"closed"}'

0 commit comments

Comments
 (0)