-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Setup functionality for commenting from a file (#18)
* Update package versions and rebuild * Fix github.GitHub is not a constructor issue * Get action in a working condition * Introduce commenting from a file * Update test workflow file - includes removing the soon to be deprecated set-outputs - Put the Test File step into its own job * README updates + ensure we use node16 * Fix failing outputs job test
- Loading branch information
Showing
8 changed files
with
6,020 additions
and
21,938 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,6 +15,10 @@ This action can be used to post a dynamic comment on a github PR | |
|
||
**Optional** A JSON comment you would like to post. Default `''`. | ||
|
||
### 'file_path' | ||
|
||
**Optional** Path to a file containing `MarkDown` (preffered) syntax with your comment. | ||
|
||
### `GITHUB_TOKEN` | ||
|
||
**Required** The value of your GitHub Actions GitHub Token, this is | ||
|
@@ -35,24 +39,35 @@ permissions: | |
## Example usage | ||
```yaml | ||
uses: JoseThen/comment-pr@v1.1.1 | ||
uses: JoseThen/comment-pr@v1.2.0 | ||
with: | ||
comment: 'This PR is the bees knees!' | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
``` | ||
```yaml | ||
uses: JoseThen/comment-pr@v1.1.1 | ||
uses: JoseThen/comment-pr@v1.2.0 | ||
with: | ||
json: '{ "this": "pr", "is": "the", "bees": "knees"}' | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
``` | ||
```yaml | ||
uses: JoseThen/[email protected] | ||
with: | ||
file_path: './tmp/pr-comment.md' | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
``` | ||
## Development | ||
You need `vercel/ncc` installed with `npm i -g @vercel/ncc` before you can | ||
- You need `vercel/ncc` installed with `npm i -g @vercel/ncc` before you can | ||
compile the logic. | ||
|
||
To build just make sure `npm ci` has been run and use `ncc build index.js` | ||
- To build just make sure `npm ci` has been run and use `ncc build index.js` | ||
|
||
- If you don't want to download `nodejs` and `npm` you can keep this containerized on the fly | ||
with `docker run --rm -it -v .:/app node:lts bash` and work from the `/app` dir in the container. | ||
|
||
## Contributors ✨ | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.