chore: update to use new github-script API (#26307)

This commit is contained in:
Ryan Manuel
2023-03-31 01:16:10 +00:00
committed by GitHub
parent 40092c0fe6
commit 9325d6577d
8 changed files with 53 additions and 39 deletions
@@ -1,5 +1,5 @@
const createPullRequest = async ({ context, github, baseBranch, branchName, description, body, reviewers }) => {
const { data: { number } } = await github.pulls.create({
const { data: { number } } = await github.rest.pulls.create({
owner: context.repo.owner,
repo: context.repo.repo,
base: baseBranch,
@@ -10,7 +10,7 @@ const createPullRequest = async ({ context, github, baseBranch, branchName, desc
})
if (reviewers) {
await github.pulls.requestReviewers({
await github.rest.pulls.requestReviewers({
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: number,