From e55727d418e99c52db29fa5e822f0eb64ce9b1ca Mon Sep 17 00:00:00 2001 From: eric sciple Date: Thu, 7 May 2020 12:11:11 -0400 Subject: consume new @actions/github for GHES support (#236) --- src/github-api-helper.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/github-api-helper.ts') diff --git a/src/github-api-helper.ts b/src/github-api-helper.ts index df11a85..e559c45 100644 --- a/src/github-api-helper.ts +++ b/src/github-api-helper.ts @@ -6,9 +6,8 @@ import * as io from '@actions/io' import * as path from 'path' import * as retryHelper from './retry-helper' import * as toolCache from '@actions/tool-cache' -import * as urlHelper from './url-helper' import {default as uuid} from 'uuid/v4' -import {ReposGetArchiveLinkParams} from '@octokit/rest' +import {Octokit} from '@octokit/rest' const IS_WINDOWS = process.platform === 'win32' @@ -75,8 +74,8 @@ async function downloadArchive( ref: string, commit: string ): Promise { - const octokit = new github.GitHub(authToken, {baseUrl: urlHelper.getApiUrl()}) - const params: ReposGetArchiveLinkParams = { + const octokit = new github.GitHub(authToken) + const params: Octokit.ReposGetArchiveLinkParams = { owner: owner, repo: repo, archive_format: IS_WINDOWS ? 'zipball' : 'tarball', -- cgit v1.2.3