Skip to content

Commit

Permalink
Make github_token input optional (#192)
Browse files Browse the repository at this point in the history
The action has access to `${{ github.token }}` anyway, so let's
make it optional to pass as input
  • Loading branch information
awendt authored Mar 5, 2021
1 parent c54e73f commit 1cad054
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ It would be more useful to use this with other GitHub Actions' outputs.

| NAME | DESCRIPTION | TYPE | REQUIRED | DEFAULT |
| --------------- | ----------------------------------------------------------------------------------------------- | -------- | -------- | ------------------------------------------------------------------------------- |
| `github_token` | A GitHub token. | `string` | `true` | `N/A` |
| `github_token` | A GitHub token. | `string` | `false` | `${{ github.token }}` |
| `labels` | The labels' name to be removed. Must be separated with line breaks if there're multiple labels. | `string` | `true` | `N/A` |
| `number` | The number of the issue or pull request. | `number` | `false` | `N/A` |
| `repo` | The owner and repository name. e.g.) `Codertocat/Hello-World` | `string` | `false` | `${{ github.event.issue.number }}` or `${{ github.event.pull_request.number }}` |
Expand All @@ -40,7 +40,6 @@ jobs:
- uses: actions-ecosystem/action-remove-labels@v1
if: ${{ startsWith(github.event.comment.body, '/remove-labels') }}
with:
github_token: ${{ secrets.github_token }}
labels: bug
```
Expand All @@ -59,7 +58,6 @@ jobs:
- uses: actions-ecosystem/action-remove-labels@v1
if: ${{ startsWith(github.event.comment.body, '/remove-labels') }}
with:
github_token: ${{ secrets.github_token }}
labels: |
documentation
changelog
Expand Down
3 changes: 2 additions & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ author: The Actions Ecosystem Authors
inputs:
github_token:
description: A GitHub token.
required: true
required: false
default: ${{ github.token }}
labels:
description: The labels' name to be removed. Must be separated with line breaks if there're multiple labels.
required: true
Expand Down

0 comments on commit 1cad054

Please sign in to comment.