Skip to content

Commit d2d4d49

Browse files
authored
Default to the GitHub token (#19)
* Default to the GitHub token We can now use `${{ github.token }}` context in `action.yml` so there will be no need to specify the input on consumer-side. * Update README.md
1 parent c068822 commit d2d4d49

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
An action which adds reviewers to the pull request when the pull request is opened.
33

44
## :arrow_forward: Usage
5-
Create a workflow (e.g. `.github/workflows/action.yml` For more detail, refer to [Configuring a workflow](https://help.github.com/en/articles/configuring-a-workflow#creating-a-workflow-file)) for running the auto-assign action. Also, add the `GITHUB_TOKEN`, in order for the auto-assign action to calls the GitHub API.
5+
Create a workflow (e.g. `.github/workflows/action.yml` For more detail, refer to [Configuring a workflow](https://help.github.com/en/articles/configuring-a-workflow#creating-a-workflow-file)) for running the auto-assign action.
66

77
```yml
88
name: 'Auto Assign'
@@ -14,7 +14,6 @@ jobs:
1414
steps:
1515
- uses: kentaro-m/auto-assign-action@v1.1.0
1616
with:
17-
repo-token: "${{ secrets.GITHUB_TOKEN }}"
1817
configuration-path: ".github/some_name_for_configs.yml" # Only needed if you use something other than .github/auto_assign.yml
1918
```
2019

action.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ author: 'Kentaro Matsushita'
44
inputs:
55
repo-token:
66
description: 'A token for the repo'
7-
required: true
7+
default: ${{ github.token }}
8+
required: false
89
configuration-path:
910
description: 'A path for the auto-assign configuration'
1011
default: '.github/auto_assign.yml'

0 commit comments

Comments
 (0)