Skip to content

Commit 2430857

Browse files
authored
chore(deps): update actions/github to v5 (lowlighter#961) [skip ci]
1 parent b7c1ac7 commit 2430857

File tree

4 files changed

+21
-42
lines changed

4 files changed

+21
-42
lines changed

.github/scripts/release.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const git = sgit(__metrics)
1010

1111
//Setup octokit
1212
const token = process.env.GITHUB_TOKEN
13-
const rest = github.getOctokit(token)
13+
const rest = github.getOctokit(token).rest
1414

1515
//Environment
1616
const maintainer = "lowlighter"

package-lock.json

Lines changed: 15 additions & 38 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
@@ -31,7 +31,7 @@
3131
"homepage": "https://github.com/lowlighter/metrics#readme",
3232
"dependencies": {
3333
"@actions/core": "^1.6.0",
34-
"@actions/github": "^4.0.0",
34+
"@actions/github": "^5.0.0",
3535
"@faker-js/faker": "^6.0.0-alpha.3",
3636
"@octokit/graphql": "^4.8.0",
3737
"@octokit/rest": "^18.12.0",

source/app/action/index.mjs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,9 @@ async function retry(func, {retries = 1, delay = 0} = {}) {
163163
const api = {}
164164
api.graphql = octokit.graphql.defaults({headers:{authorization:`token ${token}`}})
165165
info("Github GraphQL API", "ok")
166-
api.rest = github.getOctokit(token)
166+
const octoraw = github.getOctokit(token)
167+
api.rest = octoraw.rest
168+
api.rest.request = octoraw.request
167169
info("Github REST API", "ok")
168170
//Apply mocking if needed
169171
if (mocked) {
@@ -222,7 +224,7 @@ async function retry(func, {retries = 1, delay = 0} = {}) {
222224
if (committer.gist)
223225
info("Committer Gist id", committer.gist)
224226
//Instantiate API for committer
225-
committer.rest = github.getOctokit(committer.token)
227+
committer.rest = github.getOctokit(committer.token).rest
226228
info("Committer REST API", "ok")
227229
try {
228230
info("Committer account", (await committer.rest.users.getAuthenticated()).data.login)

0 commit comments

Comments
 (0)