Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: lee-dohm/[email protected]
with:
token: ${{ github.token }}
```

### Inputs
Expand All @@ -35,7 +33,7 @@ See [`action.yml`](action.yml) for defaults.
- `daysUntilClose` — Number of days to wait for a response from the original author before closing.
- `responseRequiredColor` — Color for the `responseRequiredLabel`. **Only** used when creating the label if it does not already exist.
- `responseRequiredLabel` — Text of the label used to indicate that a response from the original author is required.
- `token` — Token used to access repo information. The default GitHub Actions token is sufficient.
- `token` — Token used to access repo information. The default GitHub Actions token is sufficient. Defaults to `github.token`.

### Outputs

Expand Down
3 changes: 2 additions & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ inputs:
default: more-information-needed
token:
description: Token to access the GitHub API
required: true
required: false
default: ${{ github.token }}
runs:
using: node12
main: 'dist/index.js'
2 changes: 1 addition & 1 deletion src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export default class Config {
'more-information-needed'
)

this.token = core.getInput('token', { required: true })
this.token = core.getInput('token')
}

valueOrDefault(value: string, defaultValue: string): string {
Expand Down
8 changes: 0 additions & 8 deletions test/config.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,13 +84,5 @@ describe('Config', () => {

expect(config.token).toEqual('123456789abcdef')
})

it('raises an error if no token is given', () => {
delete process.env.INPUT_TOKEN

expect(() => {
new Config()
}).toThrow()
})
})
})