-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (36 loc) · 1.21 KB
/
Copy pathissue_comment.yaml
File metadata and controls
41 lines (36 loc) · 1.21 KB
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
36
37
38
39
40
41
name: Create a comment on new issues
on:
issues:
types: [opened]
jobs:
comment-with-action:
runs-on: ubuntu-latest
steps:
- name: "dump github context"
run: echo '${{ toJSON(github.event) }}' | jq
shell: bash
- name: Create comment
uses: peter-evans/create-or-update-comment@v3
with:
issue-number: ${{ github.event.issue.number }}
body: |
This is a multi-line test comment
- With GitHub **Markdown** :sparkles:
- Created by [create-or-update-comment][1]
[1]: https://github.com/peter-evans/create-or-update-comment
reactions: '+1'
comment-with-api:
runs-on: ubuntu-latest
steps:
- name: Create comment with API
run: |
gh api -X POST \
http://api.github.com/repo/${ORGANIZATION}/${REPOSITORY}/issues/${ISSUE_NUMBER/comment \
-f body='
Comment but from API call not action
'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ORGANIZATION: ${{ github.event.organization.login }}
REPOSITORY: ${{ github.event.repository.name }}
ISSUE_NUMBER: ${{ github.event.issue.number }}