diff --git a/.github/workflows/triage-info-needed.yml b/.github/workflows/triage-info-needed.yml index 3b4165c74c55..07b20b0aec3f 100644 --- a/.github/workflows/triage-info-needed.yml +++ b/.github/workflows/triage-info-needed.yml @@ -21,7 +21,7 @@ jobs: with: github-token: ${{ secrets.GITHUB_TOKEN }} script: | - const issue = await github.issues.get({ + const issue = await github.rest.issues.get({ owner: context.repo.owner, repo: context.repo.repo, issue_number: context.issue.number @@ -36,7 +36,7 @@ jobs: const shouldAddLabel = isTeamMember && commentAuthor !== issue.data.user.login && isRequestForInfo; if (shouldAddLabel) { - await github.issues.addLabels({ + await github.rest.issues.addLabels({ owner: context.repo.owner, repo: context.repo.repo, issue_number: context.issue.number, @@ -55,7 +55,7 @@ jobs: with: github-token: ${{ secrets.GITHUB_TOKEN }} script: | - const issue = await github.issues.get({ + const issue = await github.rest.issues.get({ owner: context.repo.owner, repo: context.repo.repo, issue_number: context.issue.number @@ -63,7 +63,7 @@ jobs: const commentAuthor = context.payload.comment.user.login; const issueAuthor = issue.data.user.login; if (commentAuthor === issueAuthor) { - await github.issues.removeLabel({ + await github.rest.issues.removeLabel({ owner: context.repo.owner, repo: context.repo.repo, issue_number: context.issue.number, @@ -77,7 +77,7 @@ jobs: } // Loop through all the comments on the issue in reverse order and find the last username that a TRIAGER mentioned // If the comment author is the last mentioned username, remove the "info-needed" label - const comments = await github.issues.listComments({ + const comments = await github.rest.issues.listComments({ owner: context.repo.owner, repo: context.repo.repo, issue_number: context.issue.number @@ -89,7 +89,7 @@ jobs: const matches = comment.body.match(/@\w+/g) || []; const mentionedUsernames = matches.map(match => match.replace('@', '')); if (mentionedUsernames.includes(commentAuthor)) { - await github.issues.removeLabel({ + await github.rest.issues.removeLabel({ owner: context.repo.owner, repo: context.repo.repo, issue_number: context.issue.number,