Vendored snapshot of checkout@v6 (no upstream history)
Build and Test / test (ubuntu-latest) (push) Failing after 43s
Build and Test / test-bypass-proxy (push) Failing after 42s
Build and Test / test-git-container (push) Failing after 1m15s
Build and Test / test-output (push) Failing after 44s
Check dist / check-dist (push) Successful in 32s
CodeQL / Analyze (javascript) (push) Failing after 1h5m14s
Licensed / Check licenses (push) Successful in 34s
Build and Test / build (push) Failing after 49s
Build and Test / test-proxy (push) Failing after 24s
Build and Test / test (macos-latest) (push) Canceled after 0s
Build and Test / test (windows-latest) (push) Canceled after 0s
Build and Test / test (ubuntu-latest) (push) Failing after 43s
Build and Test / test-bypass-proxy (push) Failing after 42s
Build and Test / test-git-container (push) Failing after 1m15s
Build and Test / test-output (push) Failing after 44s
Check dist / check-dist (push) Successful in 32s
CodeQL / Analyze (javascript) (push) Failing after 1h5m14s
Licensed / Check licenses (push) Successful in 34s
Build and Test / build (push) Failing after 49s
Build and Test / test-proxy (push) Failing after 24s
Build and Test / test (macos-latest) (push) Canceled after 0s
Build and Test / test (windows-latest) (push) Canceled after 0s
This commit is contained in:
@@ -143,6 +143,16 @@ describe('input-helper tests', () => {
|
||||
expect(settings.commit).toBe('1111111111222222222233333333334444444444')
|
||||
})
|
||||
|
||||
it('sets ref to empty when explicit sha-256', async () => {
|
||||
inputs.ref =
|
||||
'1111111111222222222233333333334444444444555555555566666666667777'
|
||||
const settings: IGitSourceSettings = await inputHelper.getInputs()
|
||||
expect(settings.ref).toBeFalsy()
|
||||
expect(settings.commit).toBe(
|
||||
'1111111111222222222233333333334444444444555555555566666666667777'
|
||||
)
|
||||
})
|
||||
|
||||
it('sets sha to empty when explicit ref', async () => {
|
||||
inputs.ref = 'refs/heads/some-other-ref'
|
||||
const settings: IGitSourceSettings = await inputHelper.getInputs()
|
||||
@@ -160,6 +170,16 @@ describe('input-helper tests', () => {
|
||||
expect(settings.ref).toBe('522d932fae5296da51fdf431934425ecf891c6a2')
|
||||
})
|
||||
|
||||
it('does not reclassify a sha-256 ref as sha when a BOM is prefixed', async () => {
|
||||
inputs.ref =
|
||||
'\uFEFF1111111111222222222233333333334444444444555555555566666666667777'
|
||||
const settings: IGitSourceSettings = await inputHelper.getInputs()
|
||||
expect(settings.commit).toBeFalsy()
|
||||
expect(settings.ref).toBe(
|
||||
'1111111111222222222233333333334444444444555555555566666666667777'
|
||||
)
|
||||
})
|
||||
|
||||
it('treats a sha surrounded by ascii whitespace as a commit', async () => {
|
||||
// ASCII whitespace can only come from the workflow author's YAML (git ref
|
||||
// names cannot contain it), so trimming it and treating the value as a
|
||||
|
||||
Reference in New Issue
Block a user