Skip to content

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
Peter Evans committed Nov 24, 2019
1 parent b84aab2 commit 963f29a
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,27 @@ This action was created to help facilitate a GitHub Actions "ChatOps" solution i
| `edit-mode` | The mode when updating a comment, `replace` or `append`. | `append` |
| `reaction-type` | The reaction to add to the comment. (`+1`, `-1`, `laugh`, `confused`, `heart`, `hooray`, `rocket`, `eyes`) | |

### Where to find the id of a comment

How to find the id of a comment will depend a lot on the use case.
Here is one example where the id can be found in the `github` context during an `issue_comment` event.

```yml
on:
issue_comment:
types: [created]
jobs:
commentCreated:
runs-on: ubuntu-latest
steps:
- name: Add reaction
uses: peter-evans/create-or-update-comment@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
comment-id: ${{ github.event.comment.id }}
reaction-type: eyes
```

### Accessing issues and comments in other repositories

You can create and update comments in another repository by using a [PAT](https://help.github.com/en/github/authenticating-to-github/creating-a-personal-access-token-for-the-command-line) instead of `GITHUB_TOKEN`.
Expand Down

0 comments on commit 963f29a

Please sign in to comment.