Default token to github.token

This commit is contained in:
Peter Evans 2020-04-04 17:59:22 +09:00
parent da580b7831
commit e9eda88d56
4 changed files with 2 additions and 9 deletions

View File

@ -18,7 +18,6 @@ jobs:
- name: Create comment - name: Create comment
uses: ./ uses: ./
with: with:
token: ${{ secrets.GITHUB_TOKEN }}
issue-number: 1 issue-number: 1
body: | body: |
This is a multi-line test comment This is a multi-line test comment

View File

@ -18,7 +18,6 @@ jobs:
if: github.event.issue.number == 1 if: github.event.issue.number == 1
uses: ./ uses: ./
with: with:
token: ${{ secrets.GITHUB_TOKEN }}
comment-id: ${{ github.event.comment.id }} comment-id: ${{ github.event.comment.id }}
body: | body: |
**Edit:** Some additional info **Edit:** Some additional info
@ -28,6 +27,5 @@ jobs:
if: github.event.issue.number == 1 if: github.event.issue.number == 1
uses: ./ uses: ./
with: with:
token: ${{ secrets.GITHUB_TOKEN }}
comment-id: ${{ github.event.comment.id }} comment-id: ${{ github.event.comment.id }}
reaction-type: heart reaction-type: heart

View File

@ -13,7 +13,6 @@ This action was created to help facilitate a GitHub Actions "ChatOps" solution i
- name: Create comment - name: Create comment
uses: peter-evans/create-or-update-comment@v1 uses: peter-evans/create-or-update-comment@v1
with: with:
token: ${{ secrets.GITHUB_TOKEN }}
issue-number: 1 issue-number: 1
body: | body: |
This is a multi-line test comment This is a multi-line test comment
@ -30,7 +29,6 @@ This action was created to help facilitate a GitHub Actions "ChatOps" solution i
- name: Update comment - name: Update comment
uses: peter-evans/create-or-update-comment@v1 uses: peter-evans/create-or-update-comment@v1
with: with:
token: ${{ secrets.GITHUB_TOKEN }}
comment-id: 557858210 comment-id: 557858210
body: | body: |
**Edit:** Some additional info **Edit:** Some additional info
@ -43,7 +41,6 @@ This action was created to help facilitate a GitHub Actions "ChatOps" solution i
- name: Add reaction - name: Add reaction
uses: peter-evans/create-or-update-comment@v1 uses: peter-evans/create-or-update-comment@v1
with: with:
token: ${{ secrets.GITHUB_TOKEN }}
comment-id: 557858210 comment-id: 557858210
reaction-type: heart reaction-type: heart
``` ```
@ -52,7 +49,7 @@ This action was created to help facilitate a GitHub Actions "ChatOps" solution i
| Name | Description | Default | | Name | Description | Default |
| --- | --- | --- | | --- | --- | --- |
| `token` | `GITHUB_TOKEN` or a `repo` scoped [PAT](https://help.github.com/en/github/authenticating-to-github/creating-a-personal-access-token-for-the-command-line). | | | `token` | `GITHUB_TOKEN` or a `repo` scoped [PAT](https://help.github.com/en/github/authenticating-to-github/creating-a-personal-access-token-for-the-command-line). | `GITHUB_TOKEN` |
| `repository` | The full name of the repository in which to create or update a comment. | Current repository | | `repository` | The full name of the repository in which to create or update a comment. | Current repository |
| `issue-number` | The number of the issue or pull request in which to create a comment. | | | `issue-number` | The number of the issue or pull request in which to create a comment. | |
| `comment-id` | The id of the comment to update. | | | `comment-id` | The id of the comment to update. | |
@ -76,7 +73,6 @@ jobs:
- name: Add reaction - name: Add reaction
uses: peter-evans/create-or-update-comment@v1 uses: peter-evans/create-or-update-comment@v1
with: with:
token: ${{ secrets.GITHUB_TOKEN }}
comment-id: ${{ github.event.comment.id }} comment-id: ${{ github.event.comment.id }}
reaction-type: eyes reaction-type: eyes
``` ```

View File

@ -3,7 +3,7 @@ description: 'Create or update an issue or pull request comment'
inputs: inputs:
token: token:
description: 'GITHUB_TOKEN or a repo scoped PAT.' description: 'GITHUB_TOKEN or a repo scoped PAT.'
required: true default: ${{ github.token }}
repository: repository:
description: 'The full name of the repository in which to create or update a comment.' description: 'The full name of the repository in which to create or update a comment.'
issue-number: issue-number: