-
Notifications
You must be signed in to change notification settings - Fork 90
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
efe5b31
commit 3ef806b
Showing
1 changed file
with
15 additions
and
15 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,21 +5,6 @@ | |
A GitHub action that comments with a given message the pull request linked to the pushed branch. | ||
You can even put dynamic data thanks to [Contexts and expression syntax](https://help.github.com/en/actions/automating-your-workflow-with-github-actions/contexts-and-expression-syntax-for-github-actions). | ||
|
||
## DISCLAIMER | ||
|
||
If you prefer not to download a full action, this can now be easily done thanks to [github scripts](https://github.com/actions/github-script). | ||
|
||
```yml | ||
- name: 'Comment PR' | ||
uses: actions/[email protected] | ||
if: github.event_name == 'pull_request' | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
script: | | ||
const { issue: { number: issue_number }, repo: { owner, repo } } = context; | ||
github.issues.createComment({ issue_number, owner, repo, body: 'Hello world ! 👋' }); | ||
``` | ||
## Usage | ||
|
||
``` | ||
|
@@ -54,3 +39,18 @@ It is handled by Typescript compiler. | |
```sh | ||
$ npm run build | ||
``` | ||
|
||
## Disclaimer | ||
|
||
If you prefer not to download a full action, this can now be easily done thanks to [github scripts](https://github.com/actions/github-script). | ||
|
||
```yml | ||
- name: 'Comment PR' | ||
uses: actions/[email protected] | ||
if: github.event_name == 'pull_request' | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
script: | | ||
const { issue: { number: issue_number }, repo: { owner, repo } } = context; | ||
github.issues.createComment({ issue_number, owner, repo, body: 'Hello world ! 👋' }); | ||
``` |