Skip to content

Commit 36a255d

Browse files
Merge pull request #500 from Adez017/master
Add auto comment workflow for new issues
2 parents bb7c9b4 + 4791482 commit 36a255d

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Auto Comment on Issue
2+
3+
on:
4+
issues:
5+
types: [opened]
6+
7+
permissions:
8+
issues: write
9+
10+
jobs:
11+
comment:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Add Comment to Issue
15+
uses: actions/github-script@v6
16+
with:
17+
script: |
18+
const issueNumber = context.issue.number;
19+
20+
const commentBody1 = `### Thank you for raising this issue!\n We'll review it as soon as possible. We truly appreciate your contributions! ✨\n\n> Meanwhile make sure you've visited the README.md, CONTRIBUTING.md, and CODE_OF_CONDUCT.md before creating a PR for this. Also, please do NOT create a PR until this issue has been assigned to you. 😊`;
21+
22+
await github.rest.issues.createComment({
23+
owner: context.repo.owner,
24+
repo: context.repo.repo,
25+
issue_number: issueNumber,
26+
body: commentBody1
27+
});
28+
29+
console.log('Both comments added successfully.');

0 commit comments

Comments
 (0)