fix: bug retrieving base sha for force push (#1216)
This commit is contained in:
		
							parent
							
								
									eeb5a258f5
								
							
						
					
					
						commit
						47db5bd435
					
				
							
								
								
									
										5
									
								
								dist/index.js
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										5
									
								
								dist/index.js
									
									
									
										generated
									
									
										vendored
									
									
								
							| @ -435,10 +435,7 @@ const getSHAForPullRequestEvent = (inputs, env, workingDirectory, isShallow, has | |||||||
|     if (!previousSha) { |     if (!previousSha) { | ||||||
|         if (inputs.sinceLastRemoteCommit) { |         if (inputs.sinceLastRemoteCommit) { | ||||||
|             previousSha = env.GITHUB_EVENT_BEFORE; |             previousSha = env.GITHUB_EVENT_BEFORE; | ||||||
|             if (!previousSha) { |             if ((yield (0, utils_1.verifyCommitSha)({ sha: previousSha, cwd: workingDirectory })) !== 0) { | ||||||
|                 previousSha = yield (0, utils_1.getParentSha)({ cwd: workingDirectory }); |  | ||||||
|             } |  | ||||||
|             if (!previousSha) { |  | ||||||
|                 previousSha = env.GITHUB_EVENT_PULL_REQUEST_BASE_SHA; |                 previousSha = env.GITHUB_EVENT_PULL_REQUEST_BASE_SHA; | ||||||
|             } |             } | ||||||
|         } |         } | ||||||
|  | |||||||
							
								
								
									
										2
									
								
								dist/index.js.map
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								dist/index.js.map
									
									
									
										generated
									
									
										vendored
									
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							| @ -359,11 +359,9 @@ export const getSHAForPullRequestEvent = async ( | |||||||
|     if (inputs.sinceLastRemoteCommit) { |     if (inputs.sinceLastRemoteCommit) { | ||||||
|       previousSha = env.GITHUB_EVENT_BEFORE |       previousSha = env.GITHUB_EVENT_BEFORE | ||||||
| 
 | 
 | ||||||
|       if (!previousSha) { |       if ( | ||||||
|         previousSha = await getParentSha({cwd: workingDirectory}) |         (await verifyCommitSha({sha: previousSha, cwd: workingDirectory})) !== 0 | ||||||
|       } |       ) { | ||||||
| 
 |  | ||||||
|       if (!previousSha) { |  | ||||||
|         previousSha = env.GITHUB_EVENT_PULL_REQUEST_BASE_SHA |         previousSha = env.GITHUB_EVENT_PULL_REQUEST_BASE_SHA | ||||||
|       } |       } | ||||||
|     } else { |     } else { | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Tonye Jack
						Tonye Jack