File tree Expand file tree Collapse file tree 2 files changed +8
-7
lines changed Expand file tree Collapse file tree 2 files changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -8321,19 +8321,19 @@ function run() {
83218321 const shouldRun = (comment === null || comment === void 0 ? void 0 : comment.body) === approveCommand;
83228322 if (!shouldRun)
83238323 return;
8324- const octokit = github.getOctokit(token);
83258324 const repository = payload.repository;
83268325 if (!repository) {
83278326 core.setFailed("Could not find repository.");
83288327 return;
83298328 }
8330- const repo = repository.name;
8331- const owner = repository.owner.login;
83328329 const pull_number = (_a = payload.issue) === null || _a === void 0 ? void 0 : _a.number;
83338330 if (!pull_number) {
83348331 core.setFailed("Could not find issue/pull request.");
83358332 return;
83368333 }
8334+ const repo = repository.name;
8335+ const owner = repository.owner.login;
8336+ const octokit = github.getOctokit(token);
83378337 const pull = yield octokit.rest.pulls.get({
83388338 owner,
83398339 repo,
Original file line number Diff line number Diff line change @@ -12,24 +12,25 @@ async function run() {
1212 const shouldRun = comment ?. body === approveCommand ;
1313 if ( ! shouldRun ) return ;
1414
15- const octokit = github . getOctokit ( token ) ;
16-
1715 const repository = payload . repository ;
1816
1917 if ( ! repository ) {
2018 core . setFailed ( "Could not find repository." ) ;
2119 return ;
2220 }
2321
24- const repo = repository . name ;
25- const owner = repository . owner . login ;
2622 const pull_number = payload . issue ?. number ;
2723
2824 if ( ! pull_number ) {
2925 core . setFailed ( "Could not find issue/pull request." ) ;
3026 return ;
3127 }
3228
29+ const repo = repository . name ;
30+ const owner = repository . owner . login ;
31+
32+ const octokit = github . getOctokit ( token ) ;
33+
3334 const pull = await octokit . rest . pulls . get ( {
3435 owner,
3536 repo,
You can’t perform that action at this time.
0 commit comments