chore: add warrning message to diff error (#1593)
Co-authored-by: GitHub Action <action@github.com>
This commit is contained in:
		
							parent
							
								
									bbe796033e
								
							
						
					
					
						commit
						4196030939
					
				
							
								
								
									
										2
									
								
								dist/index.js
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								dist/index.js
									
									
									
										generated
									
									
										vendored
									
									
								
							| @ -1261,6 +1261,8 @@ const getSHAForPullRequestEvent = (inputs, env, workingDirectory, isShallow, has | ||||
|         sha2: currentSha, | ||||
|         diff | ||||
|     }))) { | ||||
|         core.warning('If this pull request is from a forked repository, please set the checkout action `repository` input to the same repository as the pull request.'); | ||||
|         core.warning('This can be done by setting actions/checkout `repository` to ${{ github.event.pull_request.head.repo.full_name }}'); | ||||
|         throw new Error(`Unable to determine a difference between ${previousSha}${diff}${currentSha}`); | ||||
|     } | ||||
|     if (previousSha === currentSha) { | ||||
|  | ||||
							
								
								
									
										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
											
										
									
								
							| @ -551,6 +551,12 @@ export const getSHAForPullRequestEvent = async ( | ||||
|       diff | ||||
|     })) | ||||
|   ) { | ||||
|     core.warning( | ||||
|       'If this pull request is from a forked repository, please set the checkout action `repository` input to the same repository as the pull request.' | ||||
|     ) | ||||
|     core.warning( | ||||
|       'This can be done by setting actions/checkout `repository` to ${{ github.event.pull_request.head.repo.full_name }}' | ||||
|     ) | ||||
|     throw new Error( | ||||
|       `Unable to determine a difference between ${previousSha}${diff}${currentSha}` | ||||
|     ) | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Tonye Jack
						Tonye Jack