Skip to content

Commit e9eda88

Browse files
committed
Default token to github.token
1 parent da580b7 commit e9eda88

File tree

4 files changed

+2
-9
lines changed

4 files changed

+2
-9
lines changed

.github/workflows/create-comment.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ jobs:
1818
- name: Create comment
1919
uses: ./
2020
with:
21-
token: ${{ secrets.GITHUB_TOKEN }}
2221
issue-number: 1
2322
body: |
2423
This is a multi-line test comment

.github/workflows/update-comment.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ jobs:
1818
if: github.event.issue.number == 1
1919
uses: ./
2020
with:
21-
token: ${{ secrets.GITHUB_TOKEN }}
2221
comment-id: ${{ github.event.comment.id }}
2322
body: |
2423
**Edit:** Some additional info
@@ -28,6 +27,5 @@ jobs:
2827
if: github.event.issue.number == 1
2928
uses: ./
3029
with:
31-
token: ${{ secrets.GITHUB_TOKEN }}
3230
comment-id: ${{ github.event.comment.id }}
3331
reaction-type: heart

README.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ This action was created to help facilitate a GitHub Actions "ChatOps" solution i
1313
- name: Create comment
1414
uses: peter-evans/create-or-update-comment@v1
1515
with:
16-
token: ${{ secrets.GITHUB_TOKEN }}
1716
issue-number: 1
1817
body: |
1918
This is a multi-line test comment
@@ -30,7 +29,6 @@ This action was created to help facilitate a GitHub Actions "ChatOps" solution i
3029
- name: Update comment
3130
uses: peter-evans/create-or-update-comment@v1
3231
with:
33-
token: ${{ secrets.GITHUB_TOKEN }}
3432
comment-id: 557858210
3533
body: |
3634
**Edit:** Some additional info
@@ -43,7 +41,6 @@ This action was created to help facilitate a GitHub Actions "ChatOps" solution i
4341
- name: Add reaction
4442
uses: peter-evans/create-or-update-comment@v1
4543
with:
46-
token: ${{ secrets.GITHUB_TOKEN }}
4744
comment-id: 557858210
4845
reaction-type: heart
4946
```
@@ -52,7 +49,7 @@ This action was created to help facilitate a GitHub Actions "ChatOps" solution i
5249
5350
| Name | Description | Default |
5451
| --- | --- | --- |
55-
| `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). | |
52+
| `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` |
5653
| `repository` | The full name of the repository in which to create or update a comment. | Current repository |
5754
| `issue-number` | The number of the issue or pull request in which to create a comment. | |
5855
| `comment-id` | The id of the comment to update. | |
@@ -76,7 +73,6 @@ jobs:
7673
- name: Add reaction
7774
uses: peter-evans/create-or-update-comment@v1
7875
with:
79-
token: ${{ secrets.GITHUB_TOKEN }}
8076
comment-id: ${{ github.event.comment.id }}
8177
reaction-type: eyes
8278
```

action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ description: 'Create or update an issue or pull request comment'
33
inputs:
44
token:
55
description: 'GITHUB_TOKEN or a repo scoped PAT.'
6-
required: true
6+
default: ${{ github.token }}
77
repository:
88
description: 'The full name of the repository in which to create or update a comment.'
99
issue-number:

0 commit comments

Comments
 (0)