-
Notifications
You must be signed in to change notification settings - Fork 1
29 lines (24 loc) · 916 Bytes
/
main.yml
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
name: First issue reply
on:
issue_comment:
types: [created]
jobs:
firstIssueReply:
# Only when it is an issue rather than a PR
if: ${{ !github.event.issue.pull_request && github.event.comment.author_association == 'NONE' }}
name: First issue reply
runs-on: ubuntu-latest
# For some reason, with only issue:write perms the action fails even though that's all we're doing
permissions: write-all
steps:
- name: Checkout main repository
uses: actions/checkout@v4
- name: First issue reply
run: |
echo "$GITHUB_CONTEXT"
gh issue comment "$ISSUE" --body "Hi @$USERNAME,"$'\n\n'"$(cat .github/FIRST_ISSUE_REPLY.md)"
env:
ISSUE: ${{ github.event.issue.number }}
USERNAME: ${{ github.event.comment.user.login }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_CONTEXT: ${{ toJson(github) }}