https://github.com/dext7r/commit-comment
This GitHub Action allows you to automatically create a commit comment on a pull request. | 此GitHub action用于自动创建提交注评论
https://github.com/dext7r/commit-comment
acttion github github-actions
Last synced: about 1 month ago
JSON representation
This GitHub Action allows you to automatically create a commit comment on a pull request. | 此GitHub action用于自动创建提交注评论
- Host: GitHub
- URL: https://github.com/dext7r/commit-comment
- Owner: dext7r
- License: mit
- Created: 2024-05-01T08:25:12.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-05-01T11:22:04.000Z (about 2 years ago)
- Last Synced: 2025-02-09T11:31:21.103Z (over 1 year ago)
- Topics: acttion, github, github-actions
- Language: JavaScript
- Homepage: https://github.com/dext7r/commit-comment
- Size: 381 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README




[](https://sonarcloud.io/dashboard?id=dext7r_commit-comment)
[](https://sonarcloud.io/dashboard?id=dext7r_commit-comment)
[](https://sonarcloud.io/dashboard?id=dext7r_commit-comment)
# Commit Comment GitHub Action
This GitHub Action allows you to automatically create a commit comment on a pull request.
## Usage
1. Add a step in your workflow YAML file to use this action:
```yaml
- name: Commit Comment
uses: dext7r/commit-comment@main
with:
token: ${{ secrets.GITHUB_TOKEN }}
body: 'This is a test comment.'
```
2. Configure the `token` input with a secret GitHub API token with the necessary permissions.
3. Specify the `body` input with the content of the comment you want to create.
## Inputs
- `token` (required): Secret GitHub API token to use for making API requests.
- `body` (required): Comment content.
## Outputs
- `comment_id`: The ID of the comment that was created.
## Example
```yaml
name: Create Comment
on:
pull_request:
types: [opened]
jobs:
comment:
runs-on: ubuntu-latest
steps:
- name: Commit Comment
uses: dext7r/commit-comment@main
with:
token: ${{ secrets.GITHUB_TOKEN }}
body: 'Hello from GitHub Action!'
```
## Versioning
This action follows semantic versioning. See [releases](https://github.com/h7ml/commit-comment/releases) for more information about each version.
## License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.