We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent bee74bb commit 84dd768Copy full SHA for 84dd768
src/action.js
@@ -47,7 +47,7 @@ const getRangeForPushEvent = () => {
47
const getRangeForEvent = async () => {
48
if (GITHUB_EVENT_NAME !== pullRequestEvent) return getRangeForPushEvent()
49
50
- const octokit = new github.GitHub(core.getInput('token'))
+ const octokit = github.getOctokit(core.getInput('token'))
51
const { owner, repo, number } = eventContext.issue
52
const { data: commits } = await octokit.pulls.listCommits({
53
owner,
src/action.test.js
@@ -32,7 +32,7 @@ const runAction = () => {
32
}
33
34
updateEnvVars({ GITHBU_TOKEN: 'test-github-token' })
35
- td.replace(github, 'GitHub', MockOctokit)
+ td.replace(github, 'getOctokit', () => new MockOctokit())
36
37
return require('./action')()
38
0 commit comments