Action to checks the count of commits in pull request.
Source branch name (default {{github.head_ref}})
Target branch name (default {{github.base_ref}})
Excepted source branches (possible to pass multiple branches separated by ;)
Possible count of commits (default 1)
In the checkout task fetch-depth should be set to 0
uses: actions/checkout@v2
with:
fetch-depth: 0
uses: sultansoy/[email protected]
with:
source-branch: ${{ github.head_ref }}
target-branch: ${{ github.base_ref }}
commits-count: 1
except-branches: 'dev;test'
Same without except-branches:
uses: sultansoy/[email protected]
if: ${{ github.head_ref != 'dev' && github.head_ref != 'test' }}
with:
source-branch: ${{ github.head_ref }}
target-branch: ${{ github.base_ref }}
commits-count: 1
except-branches: 'dev'