Skip to content

Commit

Permalink
fix: switch to import for @octokit/rest
Browse files Browse the repository at this point in the history
  • Loading branch information
wraithgar committed Jun 21, 2024
1 parent aa29235 commit c7a550c
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 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,7 +8,6 @@ const { request: fetch } = require('undici')
const { getPublishTag, block, noop } = require('./util')

class ReleaseManager {
#octokit
#owner
#repo
#cwd
Expand All @@ -28,7 +26,6 @@ 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
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')

Check failure on line 47 in lib/release/release-manager.js

View workflow job for this annotation

GitHub Actions / Lint

Unable to resolve path to module '@octokit/rest'
const octokit = new Octokit({ auth: token })

Check failure on line 48 in lib/release/release-manager.js

View workflow job for this annotation

GitHub Actions / Lint

'token' is not defined

Check failure on line 48 in lib/release/release-manager.js

View workflow job for this annotation

GitHub Actions / Test - macOS - 22.x

token is not defined

Check failure on line 48 in lib/release/release-manager.js

View workflow job for this annotation

GitHub Actions / Test - macOS - 22.x

token is not defined

Check failure on line 48 in lib/release/release-manager.js

View workflow job for this annotation

GitHub Actions / Test - macOS - 22.x

token is not defined

Check failure on line 48 in lib/release/release-manager.js

View workflow job for this annotation

GitHub Actions / Test - macOS - 22.x

token is not defined

Check failure on line 48 in lib/release/release-manager.js

View workflow job for this annotation

GitHub Actions / Test - macOS - 22.x

token is not defined

Check failure on line 48 in lib/release/release-manager.js

View workflow job for this annotation

GitHub Actions / Test - macOS - 18.17.0

token is not defined

Check failure on line 48 in lib/release/release-manager.js

View workflow job for this annotation

GitHub Actions / Test - macOS - 18.17.0

token is not defined

Check failure on line 48 in lib/release/release-manager.js

View workflow job for this annotation

GitHub Actions / Test - macOS - 18.17.0

token is not defined

Check failure on line 48 in lib/release/release-manager.js

View workflow job for this annotation

GitHub Actions / Test - macOS - 18.17.0

token is not defined

Check failure on line 48 in lib/release/release-manager.js

View workflow job for this annotation

GitHub Actions / Test - macOS - 18.17.0

token is not defined

Check failure on line 48 in lib/release/release-manager.js

View workflow job for this annotation

GitHub Actions / Test - macOS - 20.5.0

token is not defined

Check failure on line 48 in lib/release/release-manager.js

View workflow job for this annotation

GitHub Actions / Test - macOS - 20.5.0

token is not defined

Check failure on line 48 in lib/release/release-manager.js

View workflow job for this annotation

GitHub Actions / Test - macOS - 20.5.0

token is not defined

Check failure on line 48 in lib/release/release-manager.js

View workflow job for this annotation

GitHub Actions / Test - macOS - 20.5.0

token is not defined

Check failure on line 48 in lib/release/release-manager.js

View workflow job for this annotation

GitHub Actions / Test - macOS - 20.5.0

token is not defined

Check failure on line 48 in lib/release/release-manager.js

View workflow job for this annotation

GitHub Actions / Test - Linux - 22.x

token is not defined

Check failure on line 48 in lib/release/release-manager.js

View workflow job for this annotation

GitHub Actions / Test - Linux - 22.x

token is not defined

Check failure on line 48 in lib/release/release-manager.js

View workflow job for this annotation

GitHub Actions / Test - Linux - 22.x

token is not defined

Check failure on line 48 in lib/release/release-manager.js

View workflow job for this annotation

GitHub Actions / Test - Linux - 22.x

token is not defined

Check failure on line 48 in lib/release/release-manager.js

View workflow job for this annotation

GitHub Actions / Test - Linux - 22.x

token is not defined

Check failure on line 48 in lib/release/release-manager.js

View workflow job for this annotation

GitHub Actions / Test - macOS - 18.x

token is not defined

Check failure on line 48 in lib/release/release-manager.js

View workflow job for this annotation

GitHub Actions / Test - macOS - 18.x

token is not defined

Check failure on line 48 in lib/release/release-manager.js

View workflow job for this annotation

GitHub Actions / Test - macOS - 18.x

token is not defined

Check failure on line 48 in lib/release/release-manager.js

View workflow job for this annotation

GitHub Actions / Test - macOS - 18.x

token is not defined

Check failure on line 48 in lib/release/release-manager.js

View workflow job for this annotation

GitHub Actions / Test - macOS - 18.x

token is not defined

Check failure on line 48 in lib/release/release-manager.js

View workflow job for this annotation

GitHub Actions / Test - Linux - 20.x

token is not defined

Check failure on line 48 in lib/release/release-manager.js

View workflow job for this annotation

GitHub Actions / Test - Linux - 20.x

token is not defined

Check failure on line 48 in lib/release/release-manager.js

View workflow job for this annotation

GitHub Actions / Test - Linux - 20.x

token is not defined

Check failure on line 48 in lib/release/release-manager.js

View workflow job for this annotation

GitHub Actions / Test - Linux - 20.x

token is not defined

Check failure on line 48 in lib/release/release-manager.js

View workflow job for this annotation

GitHub Actions / Test - Linux - 20.x

token is not defined

Check failure on line 48 in lib/release/release-manager.js

View workflow job for this annotation

GitHub Actions / Test - Linux - 18.x

token is not defined

Check failure on line 48 in lib/release/release-manager.js

View workflow job for this annotation

GitHub Actions / Test - Linux - 18.x

token is not defined

Check failure on line 48 in lib/release/release-manager.js

View workflow job for this annotation

GitHub Actions / Test - Linux - 18.x

token is not defined

Check failure on line 48 in lib/release/release-manager.js

View workflow job for this annotation

GitHub Actions / Test - Linux - 18.x

token is not defined

Check failure on line 48 in lib/release/release-manager.js

View workflow job for this annotation

GitHub Actions / Test - Linux - 18.x

token is not defined

Check failure on line 48 in lib/release/release-manager.js

View workflow job for this annotation

GitHub Actions / Test - Linux - 18.17.0

token is not defined

Check failure on line 48 in lib/release/release-manager.js

View workflow job for this annotation

GitHub Actions / Test - Linux - 18.17.0

token is not defined

Check failure on line 48 in lib/release/release-manager.js

View workflow job for this annotation

GitHub Actions / Test - Linux - 18.17.0

token is not defined

Check failure on line 48 in lib/release/release-manager.js

View workflow job for this annotation

GitHub Actions / Test - Linux - 18.17.0

token is not defined

Check failure on line 48 in lib/release/release-manager.js

View workflow job for this annotation

GitHub Actions / Test - Linux - 18.17.0

token is not defined

Check failure on line 48 in lib/release/release-manager.js

View workflow job for this annotation

GitHub Actions / Test - macOS - 20.x

token is not defined

Check failure on line 48 in lib/release/release-manager.js

View workflow job for this annotation

GitHub Actions / Test - macOS - 20.x

token is not defined

Check failure on line 48 in lib/release/release-manager.js

View workflow job for this annotation

GitHub Actions / Test - macOS - 20.x

token is not defined

Check failure on line 48 in lib/release/release-manager.js

View workflow job for this annotation

GitHub Actions / Test - macOS - 20.x

token is not defined

Check failure on line 48 in lib/release/release-manager.js

View workflow job for this annotation

GitHub Actions / Test - macOS - 20.x

token is not defined

Check failure on line 48 in lib/release/release-manager.js

View workflow job for this annotation

GitHub Actions / Test - Linux - 20.5.0

token is not defined

Check failure on line 48 in lib/release/release-manager.js

View workflow job for this annotation

GitHub Actions / Test - Linux - 20.5.0

token is not defined

Check failure on line 48 in lib/release/release-manager.js

View workflow job for this annotation

GitHub Actions / Test - Linux - 20.5.0

token is not defined

Check failure on line 48 in lib/release/release-manager.js

View workflow job for this annotation

GitHub Actions / Test - Linux - 20.5.0

token is not defined

Check failure on line 48 in lib/release/release-manager.js

View workflow job for this annotation

GitHub Actions / Test - Linux - 20.5.0

token is not defined
const { data: pullRequest } = await octokit.rest.pulls.get({
owner: this.#owner,
repo: this.#repo,
pull_number: this.#pr,
Expand Down

0 comments on commit c7a550c

Please sign in to comment.