Skip to content

Commit 0486786

Browse files
authored
CI: fetch the whole history before linting (#2770)
1 parent 37fdd94 commit 0486786

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

.github/workflows/test_pr.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,15 +55,14 @@ jobs:
5555
runs-on: ubuntu-latest
5656
environment: Package Check
5757
steps:
58-
- name: Count how many commits need to be fetched
59-
id: base-depth
60-
run: echo "base-depth=$(expr ${{ github.event.pull_request.commits }} + 1)" >> $GITHUB_OUTPUT
6158
- uses: actions/checkout@v4
6259
with:
6360
ref: ${{ github.event.pull_request.head.sha }}
64-
fetch-depth: ${{ steps.base-depth.outputs.base-depth }}
65-
- name: Fetch necessary Git objects
61+
fetch-depth: 0
62+
- name: Rebase branch before linting
6663
run: |
64+
git config user.name "github-actions[bot]"
65+
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
6766
pr_head=$(/usr/bin/git log -1 --format=%H)
6867
git fetch origin ${{ github.base_ref }}
6968
git checkout ${{ github.base_ref }}

0 commit comments

Comments
 (0)