mirror of
https://github.com/actions/checkout.git
synced 2025-07-04 04:48:25 +02:00
add support for gist.github.com
This commit is contained in:
@ -767,6 +767,7 @@ async function setup(testName: string): Promise<void> {
|
||||
repositoryName: 'my-repo',
|
||||
repositoryOwner: 'my-org',
|
||||
repositoryPath: '',
|
||||
isGist: false,
|
||||
sshKey: sshPath ? 'some ssh private key' : '',
|
||||
sshKnownHosts: '',
|
||||
sshStrict: true
|
||||
|
@ -117,6 +117,13 @@ describe('input-helper tests', () => {
|
||||
expect(settings.commit).toBeFalsy()
|
||||
})
|
||||
|
||||
it('sets correct default ref/sha for gist', () => {
|
||||
inputs.gist = 'some-owner/some-gist'
|
||||
const settings: IGitSourceSettings = inputHelper.getInputs()
|
||||
expect(settings.ref).toBe('refs/heads/master')
|
||||
expect(settings.commit).toBeFalsy()
|
||||
})
|
||||
|
||||
it('sets ref to empty when explicit sha', () => {
|
||||
inputs.ref = '1111111111222222222233333333334444444444'
|
||||
const settings: IGitSourceSettings = inputHelper.getInputs()
|
||||
|
Reference in New Issue
Block a user