Giter VIP home page Giter VIP logo

maintain-one-comment's Introduction

๐Ÿ“Œ 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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.