Skip to content

Commit 1538aea

Browse files
authored
Merge pull request #213 from Adez017/main
Add auto comment workflow for new pull requests
2 parents c926571 + 97142aa commit 1538aea

1 file changed

Lines changed: 30 additions & 0 deletions

File tree

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Auto Comment on PR
2+
3+
on:
4+
pull_request_target:
5+
types: [opened]
6+
7+
permissions:
8+
issues: write
9+
pull-requests: write
10+
11+
jobs:
12+
comment:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Comment on PR
16+
uses: actions/github-script@v6
17+
with:
18+
script: |
19+
const prNumber = context.issue.number;
20+
21+
const commentBody = `### Thanks for creating a PR for your Issue! ☺️\n\nWe'll review it as soon as possible.\nIn the meantime, please double-check the **file changes** and ensure that **all commits** are accurate.\n\nIf there are any **unresolved review comments**, feel free to resolve them. 🙌🏼`;
22+
23+
await github.rest.issues.createComment({
24+
owner: context.repo.owner,
25+
repo: context.repo.repo,
26+
issue_number: prNumber,
27+
body: commentBody
28+
});
29+
30+
console.log('Comment added successfully.');

0 commit comments

Comments
 (0)