Skip to content

Commit

Permalink
feat(close-pr): add close-pr helper (#332)
Browse files Browse the repository at this point in the history
* feat(close-pr): add close-pr helper

* add comment body

* update workflow
  • Loading branch information
danadajian authored Feb 14, 2023
1 parent f699d21 commit 68b968d
Show file tree
Hide file tree
Showing 8 changed files with 403 additions and 1 deletion.
26 changes: 26 additions & 0 deletions .github/workflows/close-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Close Pr

on:
pull_request:
branches: [ main ]
types: [ opened, reopened ]
paths:
- 'src/helpers/close-pr.ts'

jobs:
test:
if: contains(github.event.pull_request.labels.*.name, 'CLOSE ME')
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.ref }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
token: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }}

- uses: ./
with:
helper: close-pr
body: Closing this PR for testing purposes!
github_token: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }}
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,9 @@ The following parameters can be used for additional control over when it is safe
* example: `override_filter_paths: package.json,package-lock.json`
* `override_filter_globs`: These are glob patterns for `override_filter_paths`

### [close-pr](.github/workflows/close-pr.yml)
* Closes a pull request

### [create-pr](.github/workflows/create-pr.yml)
* Opens a pull request

Expand Down
261 changes: 261 additions & 0 deletions dist/830.index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 68b968d

Please sign in to comment.