kewisch/action-web-ext

'Lint' fails because of lack of token?

axelsimon opened this issue · 5 comments

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 commented

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 commented

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

this.octokit = github.getOctokit(token);

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 commented

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.

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.