Skip to content

πŸ“Œ Maintain just one comment in Issue and PR by GitHub Action.

License

Notifications You must be signed in to change notification settings

actions-cool/maintain-one-comment

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

38 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ“Œ Maintain One Comment

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

Preview

How to use?

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 -->'

Inputs

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

Outputs

Note

  • 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

Emoji List

input emoji
+1 πŸ‘
-1 πŸ‘Ž
laugh πŸ˜„
confused πŸ˜•
heart ❀️
hooray πŸŽ‰
rocket πŸš€
eyes πŸ‘€

Changelog

CHANGELOG

LICENSE

MIT