File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change 12
12
steps :
13
13
- uses : actions/checkout@v4
14
14
with :
15
- fetch-depth :
16
- ref : ${{ github.event.pull_request.head.ref }} # Checkout the branch of the PR.
17
- repository : ${{ github.event.pull_request.head.repo.full_name }} # Handles forks.
15
+ fetch-depth : 0
18
16
19
17
- name : Setup Python
20
18
uses : actions/setup-python@v5
26
24
python -m pip install --upgrade pip
27
25
pip install -r cz-requirement.txt
28
26
27
+ - name : Get base and head commits
28
+ id : commits
29
+ run : |
30
+ echo "BASE_SHA=$(git merge-base origin/${{ github.event.pull_request.base.ref }} HEAD)" >> $GITHUB_ENV
31
+ echo "HEAD_SHA=$(git rev-parse HEAD)" >> $GITHUB_ENV
32
+
29
33
- name : Check commit history
30
- run : cz check --rev-range $(git rev-list --all --reverse | head -1)..HEAD
34
+ run : cz check --rev-range $BASE_SHA..$HEAD_SHA
You can’t perform that action at this time.
0 commit comments