A lightweight GitHub Action to add, update, or manage pull request comments.
No Node.js required — uses only bash, jq, perl, and gh (all pre-installed on GitHub runners). No node_modules, no build step, immune to Node.js version deprecations.
Marker-compatible with mshick/add-pr-comment — uses the same <!-- add-pr-comment:... --> comment markers so existing sticky comments are found and updated seamlessly. See Differences for feature gaps.
- uses: 3MUl0R/bashful-comment@v1
with:
message: |
Deployment succeeded!
Version: ${{ env.VERSION }}- uses: 3MUl0R/bashful-comment@v1
if: success() || failure()
with:
message-success: "Deploy succeeded"
message-failure: "Deploy failed"- uses: 3MUl0R/bashful-comment@v1
with:
message-id: "deploy-status"
message: "Latest deploy: ${{ env.VERSION }}"- uses: 3MUl0R/bashful-comment@v1
with:
message-path: coverage-report.txt
preformatted: true- uses: 3MUl0R/bashful-comment@v1
with:
message-path: |
reports/*.txt
summary.md- uses: 3MUl0R/bashful-comment@v1
with:
message-id: "status-tracker"
find: |
Status: .*/gi
replace: |
Status: Complete- uses: 3MUl0R/bashful-comment@v1
with:
message: "Deployed!"
github-host: github.example.com
github-enterprise-token: ${{ secrets.GHE_TOKEN }}| Input | Default | Description |
|---|---|---|
message |
Comment body (mutually exclusive with message-path) |
|
message-path |
Path(s) or glob(s) to file(s) to use as message (newline-separated, mutually exclusive with message) |
|
message-id |
Unique ID for finding/updating existing comments | |
refresh-message-position |
false |
Delete + recreate to move updated comment to bottom |
repo-token |
${{ github.token }} |
GitHub token |
repo-owner |
${{ github.repository_owner }} |
Repository owner |
repo-name |
${{ github.event.repository.name }} |
Repository name |
allow-repeats |
false |
Allow duplicate comments |
status |
${{ job.status }} |
Job status for status-specific messages |
message-success |
Message when status is success |
|
message-failure |
Message when status is failure |
|
message-cancelled |
Message when status is cancelled |
|
message-skipped |
Message when status is skipped |
|
issue |
Explicit issue/PR number | |
update-only |
false |
Only update existing comments, don't create new |
preformatted |
false |
Wrap message in a code block |
find |
Regex pattern(s) to find in existing comment (one per line, supports inline modifiers like /pattern/gi) |
|
replace |
Replacement(s) for find patterns (one per line; single replacement reused for all patterns) | |
github-host |
GitHub Enterprise Server hostname | |
github-enterprise-token |
Token for GHES |
| Output | Description |
|---|---|
comment-created |
true if a new comment was created |
comment-updated |
true if an existing comment was updated (includes refresh mode) |
comment-id |
ID of the created or updated comment |
This action uses tools pre-installed on all GitHub-hosted runners:
bash— shell executiongh— GitHub API calls (authenticated viarepo-token)jq— JSON parsingperl— regex find/replace
- No
proxy-urlsupport. The original supports a proxy service for commenting on fork-based PRs whereGITHUB_TOKENlacks write permissions. This action does not implement proxy support. For fork PRs, consider using apull_request_targetevent trigger instead. Security note:pull_request_targetruns with write access to the base repo — only use it if your workflow does not check out or execute code from the PR. See GitHub's security guidance. - No Node.js dependency. This means no vulnerability scanning noise from transitive npm packages and no Node.js version deprecation warnings.
MIT