Skip to content

Commit 1208ce4

Browse files
authored
Merge pull request #91 from wagoid/dependabot/npm_and_yarn/actions/github-4.0.0
chore(deps): bump @actions/github from 1.1.0 to 4.0.0
2 parents 9fe338d + 35f989c commit 1208ce4

File tree

4 files changed

+232
-20
lines changed

4 files changed

+232
-20
lines changed

package-lock.json

Lines changed: 229 additions & 16 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"homepage": "https://github.com/wagoid/commitlint-github-action",
1818
"dependencies": {
1919
"@actions/core": "^1.2.6",
20-
"@actions/github": "^1.1.0",
20+
"@actions/github": "^4.0.0",
2121
"@commitlint/config-angular": "^9.1.2",
2222
"@commitlint/config-conventional": "^9.1.2",
2323
"@commitlint/config-lerna-scopes": "^9.1.2",

src/action.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ const getRangeForPushEvent = () => {
4747
const getRangeForEvent = async () => {
4848
if (GITHUB_EVENT_NAME !== pullRequestEvent) return getRangeForPushEvent()
4949

50-
const octokit = new github.GitHub(core.getInput('token'))
50+
const octokit = github.getOctokit(core.getInput('token'))
5151
const { owner, repo, number } = eventContext.issue
5252
const { data: commits } = await octokit.pulls.listCommits({
5353
owner,

src/action.test.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,7 @@ const runAction = () => {
3131
}
3232
}
3333

34-
updateEnvVars({ GITHBU_TOKEN: 'test-github-token' })
35-
td.replace(github, 'GitHub', MockOctokit)
34+
td.replace(github, 'getOctokit', () => new MockOctokit())
3635

3736
return require('./action')()
3837
}

0 commit comments

Comments
 (0)