Skip to content

Commit 143d4f8

Browse files
Update comment-PR.yml
1 parent 399c33f commit 143d4f8

File tree

1 file changed

+10
-14
lines changed

1 file changed

+10
-14
lines changed

.github/workflows/comment-PR.yml

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,15 @@
11
name: Comment on Pull Request
2-
32
on:
4-
pull_request_target:
5-
types: [opened, reopened]
6-
3+
pull_request:
4+
types: [opened]
5+
permissions:
6+
pull-requests: write
77
jobs:
8-
comment:
8+
build:
9+
name: Post welcome comment
910
runs-on: ubuntu-latest
1011
steps:
11-
- uses: actions/github-script@v6
12-
with:
13-
script: |
14-
github.rest.issues.createComment({
15-
issue_number: context.issue.number,
16-
owner: context.repo.owner,
17-
repo: context.repo.repo,
18-
body: 'Hi!😃 \n Thanks for this PR!'
19-
})
12+
- run: gh pr comment $PR_URL --body "Welcome to the repository!"
13+
env:
14+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
15+
PR_URL: ${{ github.event.pull_request.html_url }}

0 commit comments

Comments
 (0)