diff --git a/actions/add-review-labels/index.js b/actions/add-review-labels/index.js index a06784ccb1b6..7b3681e3ac03 100644 --- a/actions/add-review-labels/index.js +++ b/actions/add-review-labels/index.js @@ -96,7 +96,7 @@ async function run() { return label.name === readyForReviewLabel; }); if (hasReadyLabel) { - await octokit.issues.removeLabel({ + await octokit.rest.issues.removeLabel({ owner: repository.owner.login, repo: repository.name, issue_number: pullRequest.number, @@ -110,7 +110,7 @@ async function run() { return label.name === additionalReviewLabel; }); if (!hasAdditionalReviewLabel) { - await octokit.issues.addLabels({ + await octokit.rest.issues.addLabels({ owner: repository.owner.login, repo: repository.name, issue_number: pullRequest.number, @@ -125,7 +125,7 @@ async function run() { return label.name === additionalReviewLabel; }); if (hasAdditionalReviewLabel) { - await octokit.issues.removeLabel({ + await octokit.rest.issues.removeLabel({ owner: repository.owner.login, repo: repository.name, issue_number: pullRequest.number, @@ -144,7 +144,7 @@ async function run() { return user === pullRequest.user.login; }); if (shouldAutoLabel) { - await octokit.issues.addLabels({ + await octokit.rest.issues.addLabels({ owner: repository.owner.login, repo: repository.name, issue_number: pullRequest.number, diff --git a/actions/issues/src/plugins/add-issue-response.js b/actions/issues/src/plugins/add-issue-response.js index 2cc335de97d3..b92a73058071 100644 --- a/actions/issues/src/plugins/add-issue-response.js +++ b/actions/issues/src/plugins/add-issue-response.js @@ -62,7 +62,7 @@ const plugin = { }); if (hasMaintainerLabel && doesNotMentionAnotherMember) { - await octokit.issues.removeLabel({ + await octokit.rest.issues.removeLabel({ owner: repository.owner.login, repo: repository.name, issue_number: issue.number, @@ -78,7 +78,7 @@ const plugin = { return; } - await octokit.issues.addLabels({ + await octokit.rest.issues.addLabels({ owner: repository.owner.login, repo: repository.name, issue_number: issue.number, @@ -89,7 +89,7 @@ const plugin = { return label.name === waitingForAuthor; }); if (hasAuthorLabel) { - await octokit.issues.removeLabel({ + await octokit.rest.issues.removeLabel({ owner: repository.owner.login, repo: repository.name, issue_number: issue.number, @@ -104,7 +104,7 @@ const plugin = { return; } - await octokit.issues.addLabels({ + await octokit.rest.issues.addLabels({ owner: repository.owner.login, repo: repository.name, issue_number: issue.number, diff --git a/actions/issues/src/plugins/add-triage-label.js b/actions/issues/src/plugins/add-triage-label.js index 4c7c922f895e..c5194bce4c0f 100644 --- a/actions/issues/src/plugins/add-triage-label.js +++ b/actions/issues/src/plugins/add-triage-label.js @@ -29,7 +29,7 @@ const plugin = { }); if (!hasTriageLabel) { - await octokit.issues?.addLabels({ + await octokit.rest.issues.addLabels({ owner: repository.owner.login, repo: repository.name, issue_number: issue.number,