-
Notifications
You must be signed in to change notification settings - Fork 105
32 lines (28 loc) · 1019 Bytes
/
reopen-pull-request.yml
File metadata and controls
32 lines (28 loc) · 1019 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
name: Reopen PR on New Commit
on:
pull_request_target:
types: [synchronize]
permissions:
pull-requests: write
jobs:
reopen-pr:
if: github.event.pull_request.user.login != github.repository_owner && github.event.pull_request.state == 'closed' && !github.event.pull_request.merged
runs-on: ubuntu-latest
name: AwesomeDevtoolsBot
steps:
- name: Reopen PR
uses: actions/github-script@v7
with:
script: |
await github.rest.pulls.update({
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: context.payload.pull_request.number,
state: 'open'
});
- name: Comment
uses: thollander/actions-comment-pull-request@v3
with:
message: |
Hey **${{ github.event.pull_request.user.login }}**, this PR has been reopened because you pushed a new commit. Thanks for updating! 🔄
pr-number: ${{ github.event.pull_request.number }}