Skip to content

Commit 8cf0f48

Browse files
Merge pull request #534 from Killer2OP/master-2
Update auto-comment-pr.yml
2 parents bb983b2 + 5094ca5 commit 8cf0f48

1 file changed

Lines changed: 24 additions & 24 deletions

File tree

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
1-
---
2-
name: Auto Comment on Pull Request
3-
on:
4-
pull_request:
5-
types:
6-
- opened
7-
jobs:
8-
comment:
9-
runs-on: ubuntu-latest
10-
steps:
11-
- name: Comment on Pull Request
12-
uses: actions/github-script@v5
13-
with:
14-
github-token: ${{ secrets.GITHUB_TOKEN }}
15-
script: >
16-
const comment = "Thank you for creating the pull request! We will review
17-
it shortly.";
18-
19-
github.issues.createComment({
20-
pull_number: context.payload.pull_request.number,
21-
owner: owner,
22-
repo: repo,
23-
body: comment
24-
});
1+
name: Auto Comment on Pull Request
2+
on:
3+
pull_request:
4+
types:
5+
- opened
6+
7+
jobs:
8+
comment:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Comment on Pull Request
12+
uses: actions/github-script@v5
13+
with:
14+
github-token: ${{ secrets.GITHUB_TOKEN }}
15+
script: |
16+
const comment = "Thank you for creating the pull request! We will review it shortly.";
17+
18+
// Use github object directly, it should have the createComment method
19+
github.issues.createComment({
20+
issue_number: context.payload.pull_request.number, // Changed pull_number to issue_number
21+
owner: context.repo.owner,
22+
repo: context.repo.repo,
23+
body: comment
24+
});

0 commit comments

Comments
 (0)