https://github.com/winterjung/comment
GitHub action to comment on pr, issue
https://github.com/winterjung/comment
action actions github-action github-actions
Last synced: about 2 months ago
JSON representation
GitHub action to comment on pr, issue
- Host: GitHub
- URL: https://github.com/winterjung/comment
- Owner: winterjung
- License: mit
- Created: 2020-03-11T18:54:51.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2024-05-20T22:31:35.000Z (about 2 years ago)
- Last Synced: 2026-05-01T12:33:37.816Z (about 2 months ago)
- Topics: action, actions, github-action, github-actions
- Language: Python
- Size: 17.6 KB
- Stars: 22
- Watchers: 1
- Forks: 7
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Comment
[](https://github.com/winterjung/comment/actions)
> GitHub action to comment on PR, issue
## Inputs
- `type`: `create`, `edit` or `delete`
- `token`: GitHub token
- `body`: Comment body. Required with `create` and `edit` type.
- `comment_id`: Comment id to edit body. Required with `edit` and `delete` type.
- `issue_number`: Number of PR, issue to comment. Required with `create` type.
## Outputs
- `id`: Created or edited comment id. Empty string for delete.
- `body`: Comment body. Empty string for delete.
## Example
```yaml
name: comment example
jobs:
example:
runs-on: ubuntu-latest
steps:
- name: Create comment
uses: winterjung/comment@v1
id: create
with:
type: create
body: "- [ ] Run tests"
issue_number: '1'
token: ${{ secrets.GITHUB_TOKEN }}
- name: Update comment
uses: winterjung/comment@v1
with:
type: edit
body: "- [x] Run tests"
comment_id: ${{ steps.create.outputs.id }}
token: ${{ secrets.GITHUB_TOKEN }}
- name: Delete comment
uses: winterjung/comment@v1
with:
type: delete
comment_id: ${{ steps.create.outputs.id }}
token: ${{ secrets.GITHUB_TOKEN }}
```
---
[MIT license]
[MIT license]: LICENSE