Skip to content

Commit 77dbd4e

Browse files
committed
fix: Fixed @actions/github integration
Signed-off-by: Jaid <jaid.jsx@gmail.com>
1 parent ce5ffa7 commit 77dbd4e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import {getInput} from "@actions/core"
44
import {exec} from "@actions/exec"
5-
import {context, GitHub} from "@actions/github"
5+
import github, {context} from "@actions/github"
66
import chalk from "chalk"
77
import getBooleanActionInput from "get-boolean-action-input"
88
import isGitRepoDirty from "is-git-repo-dirty"
@@ -178,7 +178,7 @@ export default class CommitManager {
178178
}
179179
this.githubToken = getInput(this.options.githubTokenInputName, {required: true})
180180
await exec("git", ["push", "--force", `https://${process.env.GITHUB_ACTOR}:${this.githubToken}@github.com/${process.env.GITHUB_REPOSITORY}.git`, `HEAD:${this.branch}`])
181-
const octokit = new GitHub(this.githubToken)
181+
const octokit = github.getOctokit(this.githubToken)
182182
const pullRequest = await this.findOrCreatePullRequest(octokit)
183183
this.pullNumber = pullRequest.number
184184
const pullLink = `https://github.com/${process.env.GITHUB_REPOSITORY}/pull/${this.pullNumber}`

0 commit comments

Comments
 (0)