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