@@ -126,33 +126,9 @@ jobs:
126
126
smp-version : ${{ steps.experimental-meta.outputs.SMP_CRATE_VERSION }}
127
127
lading-version : ${{ steps.experimental-meta.outputs.LADING_VERSION }}
128
128
steps :
129
-
130
129
- uses : actions/checkout@v3
131
-
132
- - name : Checkout PR (issue_comment)
133
- if : github.event_name == 'issue_comment'
134
- env :
135
- GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
136
- run : gh pr checkout ${{ github.event.issue.number }}
137
-
138
- - name : Get PR branch name (issue_comment)
139
- id : get-pr-branch-name
140
- if : github.event_name == 'issue_comment'
141
- env :
142
- GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
143
- run : |
144
- export BRANCH=$(git branch --show-current)
145
- echo "BRANCH=${BRANCH}"
146
- echo "BRANCH=${BRANCH}" >> $GITHUB_OUTPUT
147
-
148
- - name : Checkout PR branch (issue_comment)
149
- if : github.event_name == 'issue_comment'
150
- uses : actions/checkout@v3
151
130
with :
152
- # TODO: this can be done more elegantly in a follow-up by using a depth value and
153
- # increasing it until the merge-base is found.
154
- fetch-depth : 500
155
- ref : " ${{ steps.get-pr-branch-name.outputs.BRANCH }}"
131
+ fetch-depth : 1000
156
132
157
133
# If triggered by issue comment, the event payload doesn't directly contain the head and base sha from the PR.
158
134
# But, we can retrieve this info from some commands.
@@ -165,6 +141,8 @@ jobs:
165
141
export PR_NUMBER=${{ github.event.issue.number }}
166
142
echo "PR_NUMBER=${PR_NUMBER}" >> $GITHUB_OUTPUT
167
143
144
+ gh pr checkout ${{ github.event.issue.number }}
145
+
168
146
export BASELINE_SHA=$(git merge-base master HEAD)
169
147
echo "BASELINE_SHA=${BASELINE_SHA}" >> $GITHUB_OUTPUT
170
148
0 commit comments