Skip to content
This repository has been archived by the owner on Nov 26, 2024. It is now read-only.

Github Action to hide comments made by Github Action

License

Notifications You must be signed in to change notification settings

alechartung/comment-hider

 
 

Repository files navigation

Github Action to hide Bot comments

build-test

Comment-hider action automatically hides comments posted to PR matching text.

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: alechartung/comment-hider@master
    name: Hide bot comments
    with:
      comment_text: /deploy
      github_token: ${{ secrets.GITHUB_TOKEN }}

  - 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 93.7%
  • JavaScript 6.3%