A GitHub action to create a comment for a commit on GitHub.
- name: Create commit comment
uses: peter-evans/commit-comment@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
body: |
This is a multi-line test comment
- With GitHub **Markdown**
- Created by [commit-comment][1]
[1]: https://github.com/peter-evans/commit-comment
token
(required) - The GitHub authentication tokensha
- The commit SHA. Defaults to the current commit.body
(required) - The contents of the comment.path
- Relative path of the file to comment on.position
- Line index in the diff to comment on.
Here is an example setting all of the input parameters.
- name: Create commit comment
uses: peter-evans/commit-comment@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
sha: 843dea1cc2e721163c20a5c876b5b155f7f3aa75
body: |
This is a multi-line test comment
- With GitHub **Markdown**
- Created by [commit-comment][1]
[1]: https://github.com/peter-evans/commit-comment
path: path/to/file.txt
position: 1