Post a comment on an issue or pull request. The body of the comment can be passed or read from one or more files. If the body is empty then a comment wont be posted.
| Input | Description | Default |
|---|---|---|
| repo-token | PAT for GitHub API authentication | ${{ github.token }} |
| issue-number | The issue or pull request number | |
| owner | The repository owner | |
| repo | The repository name | ${{ github.repository }} |
| content | The body of the comment | |
| path | The path of the file containing the comment | |
| header | The comment header | |
| footer | The comment footer | |
| skip-label | Skips posting comment if label is present | no comment |
| Output | Description |
|---|---|
| comment-id | The comment ID |
| posted | A boolean indicating whether a comment was posted |
Personal Access Token (PAT) that allows the stale workflow to authenticate and perform API calls to GitHub. Under the hood, it uses the @actions/github package.
Default value: ${{ github.token }}
The issue or pull request number. If blank and the event is pull request it will use that.
The repository owner. Defaults to current repository owner unless repo includes an owner.
The repository name. Can also include the owner in the format {{ owner }}/{{ repo }}. Defaults to the current repository.
Default value: ${{ github.repository }}
The body of the comment. If blank and path is empty or file contents amount to being blank then no comment will be posted.
The path of the file containing the comment. Can be a list of files or a file glob. Multiple files will be concatenated together.
The header of the comment.
The footer of the comment.
Skips posting comment if label is present. Leave blank to disable.
Default value: no comment
The ID of the comment created.
A boolean indicating whether a comment was posted.
See also action.yml for a comprehensive list of all the options.
Basic usage:
jobs:
comment:
name: Comment
runs-on: ubuntu-latest
steps:
- uses: ArkoseLabs/post-comment-action@v1
with:
header: "# Title"
content: This is a comment
footer: "*Footer*"