Skip to content

Commit

Permalink
Handle closed PR actions in Restyled workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
pbrisbin committed Sep 24, 2024
1 parent 38ab8e1 commit 70e7f52
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .github/workflows/restyled.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@ name: Restyled

on:
pull_request:
types:
# Types when we want to Restyle
- opened
- reopened
- synchronize

# So we can clean up if necessary
- closed

jobs:
restyled:
Expand All @@ -28,3 +36,9 @@ jobs:
labels: restyled
reviewers: ${{ github.event.pull_request.user.login }}
delete-branch: true
- if: ${{ github.event.pull_request.state == 'closed' }}
run: gh pr close --delete-branch "$RESTYLED_BRANCH" || true
env:
RESTYLED_BRANCH: ${{ steps.restyler.outputs.restyled-head }}
GH_TOKEN: ${{ github.token }}

0 comments on commit 70e7f52

Please sign in to comment.