File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -294,13 +294,15 @@ def _is_entirely_submodule_updates(repo, commit):
294294#----------------------------------------------------------------------------
295295
296296def check_all_commits (config , repo ):
297- # Get a list of commits that we'll be examining. Use the programmatic form
297+ # Get a list of commits that we'll be examining. Use the programmatic form
298298 # of "git log GITHUB_BASE_REF..GITHUB_HEAD_REF" (i.e., "git log
299299 # ^GITHUB_BASE_REF GITHUB_HEAD_REF") to do the heavy lifting to find that
300- # set of commits.
300+ # set of commits. Because we're using pull_request_target, GITHUB_BASE_REF
301+ # is already checked out. GITHUB_HEAD_REF has never been checked out, so we
302+ # specify "origin/{GITHUB_HEAD_REF}".
301303 git_cli = git .cmd .Git (GITHUB_WORKSPACE )
302304 hashes = git_cli .log (f"--pretty=format:%h" ,
303- f"{ GITHUB_BASE_REF } ..{ GITHUB_HEAD_REF } " ).splitlines ()
305+ f"{ GITHUB_BASE_REF } ..origin/ { GITHUB_HEAD_REF } " ).splitlines ()
304306
305307 #------------------------------------------------------------------------
306308
You can’t perform that action at this time.
0 commit comments