johanwulf/Replace Comment
Find, delete, and recreate GitHub comments to keep them at the bottom of conversations
View on GitHubTrust Signals
- Scorecard Score
- not yet scored
- Maintenance Recency
- Activelast commit Mar 31, 2026
- License
- MIT
Pinned Snippet
uses: johanwulf/replace-comment@73e5abab2457a7742d94f71355f878f25e950c71 # v1tags can be moved; commit SHAs can't. why a SHA?
Inputs
| name | description | required | default |
|---|---|---|---|
| token | GITHUB_TOKEN or a repo scoped PAT | no | ${{ github.token }} |
| repository | The full name of the repository containing the issue or pull request | no | ${{ github.repository }} |
| issue-number | The number of the issue or pull request in which to find and replace the comment | yes | — |
| body-includes | A string to search for in the body of comments. Cannot be used with body-regex | no | — |
| body-regex | A regular expression to search for in the body of comments. Cannot be used with body-includes | no | — |
| comment-author | The GitHub user name of the comment author | no | — |
| direction | Search direction, specified as first or last | no | first |
| nth | 0-indexed number, specifying which comment to update if multiple are found | no | 0 |
| body | The comment body. Cannot be used with body-path | no | — |
| body-path | The path to a file containing the comment body. Cannot be used with body | no | — |
| reactions | A comma separated list of reactions to add to the comment (+1, -1, laugh, confused, heart, hooray, rocket, eyes) | no | — |
Outputs
| name | description |
|---|---|
| comment-id | The ID of the created comment |
| comment-url | The URL of the created comment |
| comment-body | The body of the created comment |
| found-comment-id | The ID of the comment that was found and deleted (if any) |