Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'Lint' fails because of lack of token? #36

Closed
axelsimon opened this issue Mar 9, 2023 · 5 comments · Fixed by #41
Closed

'Lint' fails because of lack of token? #36

axelsimon opened this issue Mar 9, 2023 · 5 comments · Fixed by #41

Comments

@axelsimon
Copy link

Hi,
I see the README says that

A token is not required for this action, though if GITHUB_TOKEN is in the environment, it will be used to create a check run.

but a recent run on this action on the Shiori web-ext failed with:

call-lint / Lint Error: Parameter token or opts.auth is required

Between the fact the token is not supposed to be needed and that the GITHUB_TOKEN is added to the env in the setup job, i'm wondering if there isn't a bug somewhere.
Thanks!

@rugk
Copy link
Contributor

rugk commented Aug 7, 2023

Yeah, also see it failing, what is wrong here?

Error: Error: Parameter token or opts.auth is required
Error: Parameter token or opts.auth is required
https://github.com/rugk/awesome-emoji-picker/actions/runs/5760316854/job/15616036996?pr=142

@rugk
Copy link
Contributor

rugk commented Aug 7, 2023

Issue seems tom happen here and well this clearly requests a token:

this.octokit = github.getOctokit(token);

@kewisch
Copy link
Owner

kewisch commented Aug 7, 2023

Good find. I think before, github was ok calling getOkctokit with a null token, but this seems to have changed. Would you be able to submit a PR that checks for a token and only conditionally creates an Octokit client? This should get us back on track.

@rugk
Copy link
Contributor

rugk commented Aug 7, 2023

I don't know that code at all, but I saw there once was a solution that just added "dummy" token there, I have no idea whether that works?

3283e66#diff-de047e248d1853c5e41e476a8cb56eb5e6feb1e4e51eb2ee9c5061e838284860L13

Just not creating/calling getOkctokit does not seem like a solution given that this variable is used at least two times. So I better let this do someone who knows this and can test it.

@kewisch
Copy link
Owner

kewisch commented Aug 7, 2023

Should be fine, the two places where it is used is guarded by a check for this.ready. There is a self-test, so if you send a pull request we should see if it works. If I send a pull request it will likely work because a valid token is used.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants