Skip to content

Commit 29e27ac

Browse files
authored
Create auto-reply.yml
created a auto-reply for issues where GitHub actions bot will say a comment (for opening an issue)
1 parent 85dce84 commit 29e27ac

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

.github/workflows/auto-reply.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: 🤖 Auto-Reply to Issues
2+
3+
on:
4+
issues:
5+
types: [opened]
6+
7+
permissions:
8+
issues: write
9+
10+
jobs:
11+
auto-comment:
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- name: Comment on new issue
16+
uses: actions/github-script@v7
17+
with:
18+
github-token: ${{ secrets.GITHUB_TOKEN }}
19+
script: |
20+
const issueNumber = context.issue.number;
21+
const username = context.payload.issue.user.login;
22+
const comment = [
23+
`👋 Hello @${username}, thank you for opening an issue!`,
24+
``,
25+
`I will get back to you as soon as i can. - 1501henify`,
26+
``,
27+
`We appreciate your input — Have a great day/night!`
28+
].join('\n');
29+
30+
await github.rest.issues.createComment({
31+
owner: context.repo.owner,
32+
repo: context.repo.repo,
33+
issue_number: issueNumber,
34+
body: comment
35+
});

0 commit comments

Comments
 (0)