Skip to content

Github Action to hide comments made by Github Action

License

Notifications You must be signed in to change notification settings

auto1-oss/comment-hider

 
 

Repository files navigation

Github Action to hide Bot comments

build-test

Comment-hider action automatically hides bot comments posted to PR.

  • Automatically hide certain users' comments posted to PR. (The default is github-actions[bot].)

Sample Workflows

Posting the results of CI/CD in the PR comments is a common practice. Comment-hider action is useful for hiding outdated posts in these cases.

on:
  pull_request:
steps:
- uses: actions/checkout@v2

- uses: kanga333/comment-hider@master
  name: Hide bot comments
  with:
    github_token: ${{ secrets.GITHUB_TOKEN }}
    # See action.yml for other options you can specify

- id: cicd
  run: |
    echo "Run some kind of CI/CD."

- uses: actions/[email protected]
  with:
    github-token: ${{ secrets.GITHUB_TOKEN }}
    script: |
      const output = `${{ steps.cicd.outputs.stdout }}`;
      github.issues.createComment({
        issue_number: context.issue.number,
        owner: context.repo.owner,
        repo: context.repo.repo,
        body: output
      })

About

Github Action to hide comments made by Github Action

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • TypeScript 61.6%
  • Dockerfile 33.9%
  • JavaScript 4.5%