add support for gist.github.com

This commit is contained in:
Daniel Hwang 2020-05-29 15:57:30 -07:00
parent aabbfeb2ce
commit ec00d65c65
No known key found for this signature in database
GPG key ID: 678563C9BB0E60C0
9 changed files with 69 additions and 16 deletions

View file

@ -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()