Skip to content

Commit

Permalink
fix: update octokit code to v20 (#15533)
Browse files Browse the repository at this point in the history
  • Loading branch information
guidari authored Jan 16, 2024
1 parent f9adf14 commit c3b1964
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
8 changes: 4 additions & 4 deletions actions/add-review-labels/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Expand All @@ -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,
Expand All @@ -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,
Expand Down
8 changes: 4 additions & 4 deletions actions/issues/src/plugins/add-issue-response.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Expand All @@ -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,
Expand All @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion actions/issues/src/plugins/add-triage-label.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit c3b1964

Please sign in to comment.