![](https://camo.githubusercontent.com/785a5503fbcaa6f9839d9c07df403260549f0c230d0dcbf436d64611d20dea59/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f72656c656173652f616374696f6e732d636f6f6c2f6d61696e7461696e2d6f6e652d636f6d6d656e743f7374796c653d666c61742d73717561726526636f6c6f723d6f72616e6765)
Maintain just one comment in Issue and PR.
- This Action is only applicable to triggers related to issue and pull_request
- When the filtered comments do not exist, will add a comment
- When the filtered comments is only one, this comment will be updated
- When the number of filtered comments exceeds 1, no operation will be performed
name: Maintain One Comment
on:
issues:
types: [opened, edited]
issue_comment:
types: [created, edited]
pull_request:
types: [assigned, opened, synchronize, edited]
jobs:
comment:
runs-on: ubuntu-latest
steps:
- name: maintain-comment
uses: actions-cool/maintain-one-comment@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
body: |
Hi 😀
emojis: '+1, laugh'
body-include: '<!-- Created by actions-cool/maintain-one-comment -->'
Name |
Desc |
Type |
Required |
token |
GitHub token |
string |
✖ |
number |
Manually control the issue or PR number |
string |
✖ |
body |
Create comment body |
string |
✖ |
emojis |
Add emoji |
string |
✖ |
update-mode |
Comment update mode. Options: replace append . Default: replace |
string |
✖ |
comment-auth |
Filter comment auth |
string |
✖ |
body-include |
Filter comment body |
string |
✖ |
delete |
Will delete all filter comments. Default false |
boolean |
✖ |
number
: When no input, it will be the issue or PR number that triggered. When input, it is the highest priority
body
: When has 1 comment, and no body input will delete this filter comment
comment-id
: Return the ID of create or updated comment.
- When PR come from fork, it requires
pull_request_target
to comment (Reasons for github built-in permissions). When use pull_request_target
, must read
input |
emoji |
+1 |
👍 |
-1 |
👎 |
laugh |
😄 |
confused |
😕 |
heart |
❤️ |
hooray |
🎉 |
rocket |
🚀 |
eyes |
👀 |
CHANGELOG
MIT