GH action is using checkout plugin, which takes fetch-depth
as a parameter to specify number of commits to fetch. Setting it
to 0 to fetch all of the history of all branches and tags.
Signed-off-by: Kinga Stefaniuk <kinga.stefaniuk@intel.com>
runs-on: ubuntu-latest
name: checkpatch review
steps:
- - name: 'Calculate PR commits + 1'
- run: echo "PR_FETCH_DEPTH=$(( ${{ github.event.pull_request.commits }} + 1 ))" >> $GITHUB_ENV
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
- fetch-depth: ${{ env.PR_FETCH_DEPTH }}
+ fetch-depth: 0
- name: 'Move prepared .checkpatch.conf file to main directory'
run: mv .github/tools/.checkpatch.conf .
- name: Run checkpatch review