mirror of
https://github.com/awesomeWM/awesome
synced 2024-11-17 07:47:41 +01:00
Fix test for previous commits
Signed-off-by: Lucas Schwiderski <lucas@lschwiderski.de>
This commit is contained in:
parent
ee3c42652e
commit
cc882585de
1 changed files with 3 additions and 2 deletions
5
.github/workflows/main.yml
vendored
5
.github/workflows/main.yml
vendored
|
@ -336,12 +336,13 @@ jobs:
|
||||||
- name: Test previous commits
|
- name: Test previous commits
|
||||||
if: matrix.test_prev_commits && github.event_name == 'pull_request'
|
if: matrix.test_prev_commits && github.event_name == 'pull_request'
|
||||||
run: |
|
run: |
|
||||||
|
git remote add fork "${{ github.event.pull_request.head.repo.git_url }}"
|
||||||
# `actions/checkout` creates a shallow repo (`--depth 1`) by default,
|
# `actions/checkout` creates a shallow repo (`--depth 1`) by default,
|
||||||
# which is fine for everything up until now. But we need individual commits now.
|
# which is fine for everything up until now. But we need individual commits now.
|
||||||
# And we only want to unshallow now, to not slow down the checkout for other jobs.
|
# And we only want to unshallow now, to not slow down the checkout for other jobs.
|
||||||
git fetch --unshallow
|
git fetch --unshallow --all
|
||||||
|
|
||||||
rev_list="$(git rev-list --bisect-all origin/${{ github.base_ref }}..origin/${{ github.head_ref }})"
|
rev_list="$(git rev-list --bisect-all origin/${{ github.base_ref }}..fork/${{ github.head_ref }})"
|
||||||
commits="$(echo "$rev_list" | grep -v 'dist=0' | cut -d' ' -f 1)"
|
commits="$(echo "$rev_list" | grep -v 'dist=0' | cut -d' ' -f 1)"
|
||||||
n="$(echo "$commits" | wc -l)"
|
n="$(echo "$commits" | wc -l)"
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue