A GitHub Action that get commits in current pull-request
Create .github/workflows/your-check.yml with the following:
name: Your Check
on: [pull_request]
jobs:
commits_check_job:
runs-on: ubuntu-latest
name: Commits Check
steps:
- name: Get PR Commits
id: 'get-pr-commits'
uses: actionshub/get-pr-commits@main
with:
token: ${{ secrets.GITHUB_TOKEN }}
You can skip specific commits by setting filter_out_pattern:
- name: Get PR Commits
id: 'get-pr-commits'
uses: actionshub/get-pr-commits@main
with:
token: ${{ secrets.GITHUB_TOKEN }}
filter_out_pattern: '[[skip_dco_check]]'This will skip any commits with [[skip_dco_check]] in the commit message. You
can further tweak the behavior of this with filter_out_flags, which sets the
regex flags on the match.
This is a fork of tim-actions/get-pr-commits, which is no longer maintained.