File tree Expand file tree Collapse file tree 2 files changed +16
-9
lines changed
Expand file tree Collapse file tree 2 files changed +16
-9
lines changed Original file line number Diff line number Diff line change @@ -68,11 +68,15 @@ jobs:
6868 }}
6969
7070 - run : git remote -vvv
71- - run : echo ${{ github.ref }}
72- - run : echo ${{ github.repository }}
73- - run : echo ${{ github.repository }}
74- - run : echo ${{ github.event.pull_request.head.sha }}
75- - run : echo ${{ env.GITHUB_HEAD_REF }}
71+ - run : git -P branch -v
72+ - run : echo ref= ${{ github.ref }}
73+ - run : echo repository= ${{ github.repository }}
74+ - run : echo event.pull_request.head.sha= ${{ github.event.pull_request.head.sha }}
75+ - run : echo head_ref= ${{ github.head_ref }}
76+ - run : echo base_ref= ${{ github.base_ref }}
77+ - run : echo env.GITHUB_HEAD_REF= ${{ env.GITHUB_HEAD_REF }}
78+ - run : echo $GITHUB_HEAD_REF
79+ - run : echo $GITHUB_BASE_REF
7680
7781 # Adapted from https://github.com/actions/checkout/issues/520#issuecomment-1167205721
7882 - name : Fetch commits to get branch diff
96100 commits : ${{ github.event.pull_request.commits }}
97101 refspec_base : ' +${{ github.event.pull_request.base.sha }}:remotes/origin/${{ github.event.pull_request.base.ref }}'
98102 refspec_pr : ' +${{ github.event.pull_request.head.sha }}:remotes/origin/${{ github.event.pull_request.head.ref }}'
103+ - run : git -P branch -v
99104
100105 # We only want to run tests on PRs when related files are changed,
101106 # or when someone triggers a manual workflow run.
Original file line number Diff line number Diff line change @@ -90,12 +90,14 @@ def compute_changes() -> None:
9090
9191
9292def git_branches () -> tuple [str , str ]:
93- target_branch = os .environ .get ("GITHUB_BASE_REF" , "" )
94- target_branch = target_branch .removeprefix ("refs/heads/" )
93+ target_ref = os .environ .get ("GITHUB_BASE_REF" , "" )
94+ print (f"GITHUB_BASE_REF: { target_ref !r} " )
95+ target_branch = target_ref .removeprefix ("refs/heads/" )
9596 print (f"target branch: { target_branch !r} " )
9697
97- head_branch = os .environ .get ("GITHUB_HEAD_REF" , "" )
98- head_branch = head_branch .removeprefix ("refs/heads/" )
98+ head_ref = os .environ .get ("GITHUB_HEAD_REF" , "" )
99+ print (f"GITHUB_HEAD_REF: { head_ref !r} " )
100+ head_branch = head_ref .removeprefix ("refs/heads/" )
99101 print (f"head branch: { head_branch !r} " )
100102 return target_branch , head_branch
101103
You can’t perform that action at this time.
0 commit comments