|
1 | | -# Modern.js Package |
| 1 | + |
| 2 | + |
| 3 | + |
| 4 | + |
| 5 | +[](https://sonarcloud.io/dashboard?id=dext7r_commit-comment) |
| 6 | +[](https://sonarcloud.io/dashboard?id=dext7r_commit-comment) |
| 7 | +[](https://sonarcloud.io/dashboard?id=dext7r_commit-comment) |
2 | 8 |
|
3 | | -## Setup |
| 9 | +# Commit Comment GitHub Action |
4 | 10 |
|
5 | | -Install the dependencies: |
| 11 | +This GitHub Action allows you to automatically create a commit comment on a pull request. |
6 | 12 |
|
7 | | -```bash |
8 | | -pnpm run install |
9 | | -``` |
| 13 | +## Usage |
10 | 14 |
|
11 | | -## Get Started |
| 15 | +1. Add a step in your workflow YAML file to use this action: |
12 | 16 |
|
13 | | -Run and debug the module: |
| 17 | + ```yaml |
| 18 | + - name: Commit Comment |
| 19 | + uses: dext7r/commit-comment@v1.0.0 |
| 20 | + with: |
| 21 | + token: ${{ secrets.GITHUB_TOKEN }} |
| 22 | + body: 'This is a test comment.' |
| 23 | + ``` |
14 | 24 |
|
15 | | -```bash |
16 | | -pnpm run dev |
17 | | -``` |
| 25 | +2. Configure the `token` input with a secret GitHub API token with the necessary permissions. |
18 | 26 |
|
19 | | -Run test cases: |
| 27 | +3. Specify the `body` input with the content of the comment you want to create. |
20 | 28 |
|
21 | | -```bash |
22 | | -pnpm run test |
23 | | -``` |
| 29 | +## Inputs |
24 | 30 |
|
25 | | -Build the module for production: |
| 31 | +- `token` (required): Secret GitHub API token to use for making API requests. |
| 32 | +- `body` (required): Comment content. |
26 | 33 |
|
27 | | -```bash |
28 | | -pnpm run build |
29 | | -``` |
| 34 | +## Outputs |
| 35 | + |
| 36 | +- `comment_id`: The ID of the comment that was created. |
| 37 | + |
| 38 | +## Example |
30 | 39 |
|
31 | | -Enable optional features: |
| 40 | +```yaml |
| 41 | +name: Create Comment |
| 42 | +on: |
| 43 | + pull_request: |
| 44 | + types: [opened] |
32 | 45 |
|
33 | | -```bash |
34 | | -pnpm run new |
| 46 | +jobs: |
| 47 | + comment: |
| 48 | + runs-on: ubuntu-latest |
| 49 | +
|
| 50 | + steps: |
| 51 | + - name: Commit Comment |
| 52 | + uses: h7ml/commit-comment@v1.0.0 |
| 53 | + with: |
| 54 | + token: ${{ secrets.GITHUB_TOKEN }} |
| 55 | + body: 'Hello from GitHub Action!' |
35 | 56 | ``` |
36 | 57 |
|
37 | | -Other commands: |
| 58 | +## Versioning |
| 59 | + |
| 60 | +This action follows semantic versioning. See [releases](https://github.com/h7ml/commit-comment/releases) for more information about each version. |
| 61 | + |
| 62 | +## License |
| 63 | + |
| 64 | +This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details. |
38 | 65 |
|
39 | | -```bash |
40 | | -pnpm run lint # Lint and fix source files |
41 | | -pnpm run change # Add a new changeset |
42 | | -pnpm run bump # Update version and changelog via changeset |
43 | | -pnpm run release # Release the package |
44 | 66 | ``` |
45 | 67 |
|
46 | | -For more information, see the [Modern.js Module documentation](https://modernjs.dev/module-tools/en). |
| 68 | +``` |
0 commit comments