mirror of
				https://github.com/actions/checkout.git
				synced 2025-11-04 13:29:15 +08:00 
			
		
		
		
	Handle hidden refs (#1774)
Co-authored-by: Chris Gavin <chris@chrisgavin.me>
This commit is contained in:
		@@ -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
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user