diff options
| author | eric sciple <ericsciple@users.noreply.github.com> | 2019-12-12 13:49:26 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-12-12 13:49:26 -0500 |
| commit | ca3a763d5ed9e04331c8a6aea85ddabcb3a6aa4d (patch) | |
| tree | 236058d4a2be4208412dc3ed294e2db566aab7d6 /src/github-api-helper.ts | |
| parent | 25ac60e43ded675f082e10f444b0ad95ea43622e (diff) | |
add input persist-credentials (#107)
Diffstat (limited to 'src/github-api-helper.ts')
| -rw-r--r-- | src/github-api-helper.ts | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/github-api-helper.ts b/src/github-api-helper.ts index b370d06..83a2b86 100644 --- a/src/github-api-helper.ts +++ b/src/github-api-helper.ts @@ -12,7 +12,7 @@ import {ReposGetArchiveLinkParams} from '@octokit/rest' const IS_WINDOWS = process.platform === 'win32' export async function downloadRepository( - accessToken: string, + authToken: string, owner: string, repo: string, ref: string, @@ -22,7 +22,7 @@ export async function downloadRepository( // Download the archive let archiveData = await retryHelper.execute(async () => { core.info('Downloading the archive') - return await downloadArchive(accessToken, owner, repo, ref, commit) + return await downloadArchive(authToken, owner, repo, ref, commit) }) // Write archive to disk @@ -68,13 +68,13 @@ export async function downloadRepository( } async function downloadArchive( - accessToken: string, + authToken: string, owner: string, repo: string, ref: string, commit: string ): Promise<Buffer> { - const octokit = new github.GitHub(accessToken) + const octokit = new github.GitHub(authToken) const params: ReposGetArchiveLinkParams = { owner: owner, repo: repo, |
