Skip to content

Commit

Permalink
Default token to github.token
Browse files Browse the repository at this point in the history
  • Loading branch information
Peter Evans committed Apr 4, 2020
1 parent da580b7 commit e9eda88
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 9 deletions.
1 change: 0 additions & 1 deletion .github/workflows/create-comment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ jobs:
- name: Create comment
uses: ./
with:
token: ${{ secrets.GITHUB_TOKEN }}
issue-number: 1
body: |
This is a multi-line test comment
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/update-comment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ jobs:
if: github.event.issue.number == 1
uses: ./
with:
token: ${{ secrets.GITHUB_TOKEN }}
comment-id: ${{ github.event.comment.id }}
body: |
**Edit:** Some additional info
Expand All @@ -28,6 +27,5 @@ jobs:
if: github.event.issue.number == 1
uses: ./
with:
token: ${{ secrets.GITHUB_TOKEN }}
comment-id: ${{ github.event.comment.id }}
reaction-type: heart
6 changes: 1 addition & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ This action was created to help facilitate a GitHub Actions "ChatOps" solution i
- name: Create comment
uses: peter-evans/create-or-update-comment@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
issue-number: 1
body: |
This is a multi-line test comment
Expand All @@ -30,7 +29,6 @@ This action was created to help facilitate a GitHub Actions "ChatOps" solution i
- name: Update comment
uses: peter-evans/create-or-update-comment@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
comment-id: 557858210
body: |
**Edit:** Some additional info
Expand All @@ -43,7 +41,6 @@ This action was created to help facilitate a GitHub Actions "ChatOps" solution i
- name: Add reaction
uses: peter-evans/create-or-update-comment@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
comment-id: 557858210
reaction-type: heart
```
Expand All @@ -52,7 +49,7 @@ This action was created to help facilitate a GitHub Actions "ChatOps" solution i
| 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 |
| `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. | |
Expand All @@ -76,7 +73,6 @@ jobs:
- name: Add reaction
uses: peter-evans/create-or-update-comment@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
comment-id: ${{ github.event.comment.id }}
reaction-type: eyes
```
Expand Down
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description: 'Create or update an issue or pull request comment'
inputs:
token:
description: 'GITHUB_TOKEN or a repo scoped PAT.'
required: true
default: ${{ github.token }}
repository:
description: 'The full name of the repository in which to create or update a comment.'
issue-number:
Expand Down

0 comments on commit e9eda88

Please sign in to comment.