diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 1ba4f2da..513cc2a9 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -15,5 +15,4 @@ jobs: Current branch is `${{ github.head_ref }}`. _(execution **${{ github.run_id }}** / attempt **${{ github.run_attempt }}**)_ comment_includes: Current branch - reactions: eyes, rocket - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file + reactions: eyes, rocket \ No newline at end of file diff --git a/README.md b/README.md index 64efaca7..e1c6e6eb 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,6 @@ jobs: with: message: | Hello world ! :wave: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} ``` @@ -41,7 +40,6 @@ It takes only valid reactions and adds it to the comment you've just created. (S message: | Hello world ! :wave: reactions: eyes, rocket - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} ``` ### Specifying which pull request to comment on @@ -57,7 +55,6 @@ That is particularly useful for manual workflow for instance (`workflow_run`). message: | Hello world ! :wave: pr_number: 123 # This will comment on pull request #123 - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} ``` @@ -76,14 +73,12 @@ _That is particularly interesting while committing multiple times in a PR and th uses: thollander/actions-comment-pull-request@v1 with: message: 'Loading ...' - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} ... - name: Edit PR comment uses: thollander/actions-comment-pull-request@v1 with: message: 'Content loaded ! (edited)' comment_includes: 'Loading' - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} ``` ## Inputs @@ -92,7 +87,7 @@ _That is particularly interesting while committing multiple times in a PR and th | Name | Description | Required | Default | | --- | --- | --- | --- | -| `GITHUB_TOKEN` | Token that is used to create comments | ✅ | | +| `GITHUB_TOKEN` | Token that is used to create comments. Defaults to ${{ github.token }} | ✅ | | | `message` | The comment body | ✅ | | | `reactions` | List of reactions for the comment (comma separated). See https://docs.github.com/en/rest/reactions#reaction-types | | | | `pr_number` | The number of the pull request where to create the comment | | current pull request number (deduced from context) | diff --git a/action.yml b/action.yml index 7d792c7c..f9c6686c 100644 --- a/action.yml +++ b/action.yml @@ -9,7 +9,8 @@ inputs: required: true GITHUB_TOKEN: description: 'Github token of the repository (automatically created by Github)' - required: true + default: ${{ github.token }} + required: false reactions: description: 'You can set some reactions on your comments through the `reactions` input.' pr_number: