File tree Expand file tree Collapse file tree 2 files changed +12
-6
lines changed
Expand file tree Collapse file tree 2 files changed +12
-6
lines changed Original file line number Diff line number Diff line change @@ -303,7 +303,10 @@ async function run() {
303303
304304 const octokit = new github.getOctokit(githubToken);
305305
306- const { data: currentPulls } = await octokit.pulls.list({ owner, repo });
306+ const { data: currentPulls } = await octokit.rest.pulls.list({
307+ owner,
308+ repo,
309+ });
307310
308311 const currentPull = currentPulls.find((pull) => {
309312 return pull.head.ref === fromBranch && pull.base.ref === toBranch;
@@ -320,7 +323,7 @@ async function run() {
320323 }
321324
322325 if (shouldCreatePullRequest) {
323- const { data: pullRequest } = await octokit.pulls.create({
326+ const { data: pullRequest } = await octokit.rest. pulls.create({
324327 owner,
325328 repo,
326329 head: fromBranch,
@@ -370,7 +373,7 @@ async function run() {
370373}
371374
372375async function hasContentDifference(octokit, fromBranch, toBranch) {
373- const { data: response } = await octokit.repos.compareCommits({
376+ const { data: response } = await octokit.rest. repos.compareCommits({
374377 owner,
375378 repo,
376379 base: toBranch,
Original file line number Diff line number Diff line change @@ -23,7 +23,10 @@ async function run() {
2323
2424 const octokit = new github . getOctokit ( githubToken ) ;
2525
26- const { data : currentPulls } = await octokit . pulls . list ( { owner, repo } ) ;
26+ const { data : currentPulls } = await octokit . rest . pulls . list ( {
27+ owner,
28+ repo,
29+ } ) ;
2730
2831 const currentPull = currentPulls . find ( ( pull ) => {
2932 return pull . head . ref === fromBranch && pull . base . ref === toBranch ;
@@ -40,7 +43,7 @@ async function run() {
4043 }
4144
4245 if ( shouldCreatePullRequest ) {
43- const { data : pullRequest } = await octokit . pulls . create ( {
46+ const { data : pullRequest } = await octokit . rest . pulls . create ( {
4447 owner,
4548 repo,
4649 head : fromBranch ,
@@ -90,7 +93,7 @@ async function run() {
9093}
9194
9295async function hasContentDifference ( octokit , fromBranch , toBranch ) {
93- const { data : response } = await octokit . repos . compareCommits ( {
96+ const { data : response } = await octokit . rest . repos . compareCommits ( {
9497 owner,
9598 repo,
9699 base : toBranch ,
You can’t perform that action at this time.
0 commit comments