Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deps: bump @octokit/rest from 19.0.13 to 21.0.0 #453

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 15 additions & 16 deletions lib/release/release-manager.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
const { Octokit } = require('@octokit/rest')
const core = require('@actions/core')
const { join } = require('path')
const semver = require('semver')
Expand All @@ -9,17 +8,16 @@ const { request: fetch } = require('undici')
const { getPublishTag, block, noop } = require('./util')

class ReleaseManager {
#octokit
#owner
#repo
#cwd
#pr
#backport
#cwd
#defaultTag
#info
#lockfile
#owner
#pr
#publish

#info
#repo
#token

constructor({ token, repo, cwd = process.cwd(), pr, backport, defaultTag, lockfile, publish, silent }) {
assert(token, 'GITHUB_TOKEN is required')
Expand All @@ -28,17 +26,16 @@ class ReleaseManager {
assert(pr, 'pr is required')
assert(defaultTag, 'defaultTag is required')

this.#octokit = new Octokit({ auth: token })
this.#owner = repo.split('/')[0]
this.#repo = repo.split('/')[1]
this.#cwd = cwd
this.#pr = pr
this.#backport = backport
this.#cwd = cwd
this.#defaultTag = defaultTag
this.#info = silent ? noop : core.info
this.#lockfile = lockfile
this.#owner = repo.split('/')[0]
this.#pr = pr
this.#publish = publish

this.#info = silent ? noop : core.info
this.#repo = repo.split('/')[1]
this.#token = token
}

static async run(options) {
Expand All @@ -47,7 +44,9 @@ class ReleaseManager {
}

async run() {
const { data: pullRequest } = await this.#octokit.rest.pulls.get({
const { Octokit } = await import('@octokit/rest')
const octokit = new Octokit({ auth: this.#token })
const { data: pullRequest } = await octokit.rest.pulls.get({
owner: this.#owner,
repo: this.#repo,
pull_number: this.#pr,
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"@npmcli/git": "^5.0.3",
"@npmcli/map-workspaces": "^3.0.0",
"@npmcli/package-json": "^5.0.0",
"@octokit/rest": "^19.0.4",
"@octokit/rest": "^21.0.0",
"dedent": "^1.5.1",
"diff": "^5.0.0",
"glob": "^10.1.0",
Expand All @@ -68,7 +68,7 @@
],
"devDependencies": {
"@github/prettier-config": "0.0.6",
"@npmcli/eslint-config": "^4.0.0",
"@npmcli/eslint-config": "^4.0.5",
"@npmcli/template-oss": "file:./",
"eslint-config-prettier": "^9.1.0",
"nock": "^13.3.8",
Expand Down
Loading