You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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)
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.
@thejohnfreeman
It has been a while since I fixed it in my code. I vaguely remember that it was caused by instantiating the GitHub object globally which went before gathering all the information it needs making it an undefined behavior.
Activity
[-]Github 2.1.0 breaks auth check[/-][+]@actions/github 2.1.0 breaks auth check[/+]tianhaoz95 commentedon Jan 29, 2020
nvm, it's a global init error.
thejohnfreeman commentedon Apr 18, 2020
What does this mean "it's a global init error"? This is the only Google result for "Parameter token or opts.auth is required".
tianhaoz95 commentedon Apr 18, 2020
@thejohnfreeman
It has been a while since I fixed it in my code. I vaguely remember that it was caused by instantiating the GitHub object globally which went before gathering all the information it needs making it an undefined behavior.