Loading __test__/ref-helper.test.ts +10 Changes for __test__/ref-helper.test.ts: 10 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -67,6 +67,16 @@ describe('ref-helper tests', () => { expect(checkoutInfo.startPoint).toBeFalsy() }) it('getCheckoutInfo refs/', async () => { const checkoutInfo = await refHelper.getCheckoutInfo( git, 'refs/gh/queue/main/pr-123', commit ) expect(checkoutInfo.ref).toBe(commit) expect(checkoutInfo.startPoint).toBeFalsy() }) it('getCheckoutInfo unqualified branch only', async () => { git.branchExists = jest.fn(async (remote: boolean, pattern: string) => { return true Loading dist/index.js +5 −1 Changes for dist/index.js: 5 added lines, 1 removed line. Original line number Diff line number Diff line Loading @@ -2000,9 +2000,13 @@ function getCheckoutInfo(git, ref, commit) { result.ref = `refs/remotes/pull/${branch}`; } // refs/tags/ else if (upperRef.startsWith('REFS/')) { else if (upperRef.startsWith('REFS/TAGS/')) { result.ref = ref; } // refs/ else if (upperRef.startsWith('REFS/') && commit) { result.ref = commit; } // Unqualified ref, check for a matching branch or tag else { if (yield git.branchExists(true, `origin/${ref}`)) { src/ref-helper.ts +5 −1 Changes for src/ref-helper.ts: 5 added lines, 1 removed line. Original line number Diff line number Diff line Loading @@ -42,9 +42,13 @@ export async function getCheckoutInfo( result.ref = `refs/remotes/pull/${branch}` } // refs/tags/ else if (upperRef.startsWith('REFS/')) { else if (upperRef.startsWith('REFS/TAGS/')) { result.ref = ref } // refs/ else if (upperRef.startsWith('REFS/') && commit) { result.ref = commit } // Unqualified ref, check for a matching branch or tag else { if (await git.branchExists(true, `origin/${ref}`)) { Loading Loading
__test__/ref-helper.test.ts +10 Changes for __test__/ref-helper.test.ts: 10 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -67,6 +67,16 @@ describe('ref-helper tests', () => { expect(checkoutInfo.startPoint).toBeFalsy() }) it('getCheckoutInfo refs/', async () => { const checkoutInfo = await refHelper.getCheckoutInfo( git, 'refs/gh/queue/main/pr-123', commit ) expect(checkoutInfo.ref).toBe(commit) expect(checkoutInfo.startPoint).toBeFalsy() }) it('getCheckoutInfo unqualified branch only', async () => { git.branchExists = jest.fn(async (remote: boolean, pattern: string) => { return true Loading
dist/index.js +5 −1 Changes for dist/index.js: 5 added lines, 1 removed line. Original line number Diff line number Diff line Loading @@ -2000,9 +2000,13 @@ function getCheckoutInfo(git, ref, commit) { result.ref = `refs/remotes/pull/${branch}`; } // refs/tags/ else if (upperRef.startsWith('REFS/')) { else if (upperRef.startsWith('REFS/TAGS/')) { result.ref = ref; } // refs/ else if (upperRef.startsWith('REFS/') && commit) { result.ref = commit; } // Unqualified ref, check for a matching branch or tag else { if (yield git.branchExists(true, `origin/${ref}`)) {
src/ref-helper.ts +5 −1 Changes for src/ref-helper.ts: 5 added lines, 1 removed line. Original line number Diff line number Diff line Loading @@ -42,9 +42,13 @@ export async function getCheckoutInfo( result.ref = `refs/remotes/pull/${branch}` } // refs/tags/ else if (upperRef.startsWith('REFS/')) { else if (upperRef.startsWith('REFS/TAGS/')) { result.ref = ref } // refs/ else if (upperRef.startsWith('REFS/') && commit) { result.ref = commit } // Unqualified ref, check for a matching branch or tag else { if (await git.branchExists(true, `origin/${ref}`)) { Loading