File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 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+ });
You can’t perform that action at this time.
0 commit comments