mirror of
				https://github.com/actions/checkout.git
				synced 2025-10-31 10:08:37 +08:00 
			
		
		
		
	.
This commit is contained in:
		
							parent
							
								
									d488e10623
								
							
						
					
					
						commit
						a42f444fdc
					
				|  | @ -63,7 +63,7 @@ describe('input-helper tests', () => { | ||||||
|   it('sets defaults', () => { |   it('sets defaults', () => { | ||||||
|     const settings: ISourceSettings = inputHelper.getInputs() |     const settings: ISourceSettings = inputHelper.getInputs() | ||||||
|     expect(settings).toBeTruthy() |     expect(settings).toBeTruthy() | ||||||
|     expect(settings.accessToken).toBeFalsy() |     expect(settings.authToken).toBeFalsy() | ||||||
|     expect(settings.clean).toBe(true) |     expect(settings.clean).toBe(true) | ||||||
|     expect(settings.commit).toBeTruthy() |     expect(settings.commit).toBeTruthy() | ||||||
|     expect(settings.commit).toBe('1234567890123456789012345678901234567890') |     expect(settings.commit).toBe('1234567890123456789012345678901234567890') | ||||||
|  |  | ||||||
							
								
								
									
										8
									
								
								dist/index.js
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										8
									
								
								dist/index.js
									
									
									
									
										vendored
									
									
								
							|  | @ -8405,12 +8405,12 @@ const retryHelper = __importStar(__webpack_require__(587)); | ||||||
| const toolCache = __importStar(__webpack_require__(533)); | const toolCache = __importStar(__webpack_require__(533)); | ||||||
| const v4_1 = __importDefault(__webpack_require__(826)); | const v4_1 = __importDefault(__webpack_require__(826)); | ||||||
| const IS_WINDOWS = process.platform === 'win32'; | const IS_WINDOWS = process.platform === 'win32'; | ||||||
| function downloadRepository(accessToken, owner, repo, ref, commit, repositoryPath) { | function downloadRepository(authToken, owner, repo, ref, commit, repositoryPath) { | ||||||
|     return __awaiter(this, void 0, void 0, function* () { |     return __awaiter(this, void 0, void 0, function* () { | ||||||
|         // Download the archive
 |         // Download the archive
 | ||||||
|         let archiveData = yield retryHelper.execute(() => __awaiter(this, void 0, void 0, function* () { |         let archiveData = yield retryHelper.execute(() => __awaiter(this, void 0, void 0, function* () { | ||||||
|             core.info('Downloading the archive'); |             core.info('Downloading the archive'); | ||||||
|             return yield downloadArchive(accessToken, owner, repo, ref, commit); |             return yield downloadArchive(authToken, owner, repo, ref, commit); | ||||||
|         })); |         })); | ||||||
|         // Write archive to disk
 |         // Write archive to disk
 | ||||||
|         core.info('Writing archive to disk'); |         core.info('Writing archive to disk'); | ||||||
|  | @ -8451,9 +8451,9 @@ function downloadRepository(accessToken, owner, repo, ref, commit, repositoryPat | ||||||
|     }); |     }); | ||||||
| } | } | ||||||
| exports.downloadRepository = downloadRepository; | exports.downloadRepository = downloadRepository; | ||||||
| function downloadArchive(accessToken, owner, repo, ref, commit) { | function downloadArchive(authToken, owner, repo, ref, commit) { | ||||||
|     return __awaiter(this, void 0, void 0, function* () { |     return __awaiter(this, void 0, void 0, function* () { | ||||||
|         const octokit = new github.GitHub(accessToken); |         const octokit = new github.GitHub(authToken); | ||||||
|         const params = { |         const params = { | ||||||
|             owner: owner, |             owner: owner, | ||||||
|             repo: repo, |             repo: repo, | ||||||
|  |  | ||||||
|  | @ -12,7 +12,7 @@ import {ReposGetArchiveLinkParams} from '@octokit/rest' | ||||||
| const IS_WINDOWS = process.platform === 'win32' | const IS_WINDOWS = process.platform === 'win32' | ||||||
| 
 | 
 | ||||||
| export async function downloadRepository( | export async function downloadRepository( | ||||||
|   accessToken: string, |   authToken: string, | ||||||
|   owner: string, |   owner: string, | ||||||
|   repo: string, |   repo: string, | ||||||
|   ref: string, |   ref: string, | ||||||
|  | @ -22,7 +22,7 @@ export async function downloadRepository( | ||||||
|   // Download the archive
 |   // Download the archive
 | ||||||
|   let archiveData = await retryHelper.execute(async () => { |   let archiveData = await retryHelper.execute(async () => { | ||||||
|     core.info('Downloading the archive') |     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
 |   // Write archive to disk
 | ||||||
|  | @ -68,13 +68,13 @@ export async function downloadRepository( | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| async function downloadArchive( | async function downloadArchive( | ||||||
|   accessToken: string, |   authToken: string, | ||||||
|   owner: string, |   owner: string, | ||||||
|   repo: string, |   repo: string, | ||||||
|   ref: string, |   ref: string, | ||||||
|   commit: string |   commit: string | ||||||
| ): Promise<Buffer> { | ): Promise<Buffer> { | ||||||
|   const octokit = new github.GitHub(accessToken) |   const octokit = new github.GitHub(authToken) | ||||||
|   const params: ReposGetArchiveLinkParams = { |   const params: ReposGetArchiveLinkParams = { | ||||||
|     owner: owner, |     owner: owner, | ||||||
|     repo: repo, |     repo: repo, | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 eric sciple
						eric sciple