Describe the bug
new github.GitHub(token); breaks when upgrade @actions/github from 2.0.1 to 2.1.0 with error message Parameter token or opts.auth is required and trace:
at Function.getAuthString (node_modules/@actions/github/src/github.ts:111:13)
at Function.getOctokitOptions (node_modules/@actions/github/src/github.ts:65:25)
at new GitHub (node_modules/@actions/github/src/github.ts:40:18)
at getOctokit (src/octo.ts:10:15)
at Object.<anonymous> (src/octo.ts:14:24)
at Object.<anonymous> (__tests__/octo.test.ts:2:1)
for details see this action run: https://github.com/tianhaoz95/readable-readme/pull/307/checks?check_run_id=411469798#step:4:97
To Reproduce
Steps to reproduce the behavior:
- use
@actions/github at version 2.0.1, construct a octokit object
- upgrade to
2.1.0
- it throws an error
Expected behavior
It should construct the octokit with token given.
Additional context
In the code we can see that 9 days ago this was added:
|
constructor(token: string, opts?: Omit<Octokit.Options, 'auth'>) |
If the octokit is complaining about auth, then it makes me think that there is a check for auth between the construction of the
github object and
octokit.
Describe the bug
new github.GitHub(token);breaks when upgrade@actions/githubfrom2.0.1to2.1.0with error messageParameter token or opts.auth is requiredand trace:for details see this action run: https://github.com/tianhaoz95/readable-readme/pull/307/checks?check_run_id=411469798#step:4:97
To Reproduce
Steps to reproduce the behavior:
@actions/githubat version2.0.1, construct a octokit object2.1.0Expected behavior
It should construct the octokit with token given.
Additional context
In the code we can see that 9 days ago this was added:
toolkit/packages/github/src/github.ts
Line 37 in 432a78c
If the octokit is complaining about auth, then it makes me think that there is a check for auth between the construction of the
githubobject andoctokit.