https://github.com/kanga333/comment-hider
Github Action to hide comments made by Github Action
https://github.com/kanga333/comment-hider
comments github-actions github-actions-ci
Last synced: about 1 year ago
JSON representation
Github Action to hide comments made by Github Action
- Host: GitHub
- URL: https://github.com/kanga333/comment-hider
- Owner: kanga333
- License: mit
- Created: 2020-07-18T00:20:54.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2023-11-09T19:45:23.000Z (over 2 years ago)
- Last Synced: 2024-12-17T03:08:02.880Z (over 1 year ago)
- Topics: comments, github-actions, github-actions-ci
- Language: TypeScript
- Homepage:
- Size: 921 KB
- Stars: 8
- Watchers: 2
- Forks: 7
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Github Action to hide Bot comments

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.
```yaml
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/github-script@0.9.0
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
})
```