Skip to content

Commit

Permalink
Try to fix scoping
Browse files Browse the repository at this point in the history
  • Loading branch information
brettcannon committed May 2, 2024
1 parent 5d7af99 commit 87e02d6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -25909,7 +25909,7 @@ function pullRequestLabels(payload) {
}
async function changedFiles(payload) {
var _token = Core.getInput("token");
var octokit = _token === "" ? new import_core.Octokit.plugin(import_plugin_paginate_rest.paginateRest)() : new import_core.Octokit.plugin(import_plugin_paginate_rest.paginateRest)({ auth: _token });
var octokit = _token === "" ? new (import_core.Octokit.plugin(import_plugin_paginate_rest.paginateRest))() : new (import_core.Octokit.plugin(import_plugin_paginate_rest.paginateRest))({ auth: _token });
return await octokit.paginate("GET /repos/{owner}/{repo}/pulls/{pull_number}/files", {
owner: payload.repository.owner.login,
repo: payload.repository.name,
Expand Down
4 changes: 2 additions & 2 deletions src/GH.res
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ let pullRequestLabels = payload =>
*/
let changedFiles = async payload => {
let octokit = switch getInput("token") {
| "" => %raw(`new Octokit.plugin(paginateRest)()`)
| "" => %raw(`new (Octokit.plugin(paginateRest))()`)
// While marked as ignored, `_token` is used inside the %raw() call.
| _token => %raw(`new Octokit.plugin(paginateRest)({ auth: _token })`)
| _token => %raw(`new (Octokit.plugin(paginateRest))({ auth: _token })`)
}

await octokit->paginate(
Expand Down

0 comments on commit 87e02d6

Please sign in to comment.