Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions .github/workflows/commit-validation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,16 @@ jobs:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0

- name: Get first commit SHA in PR
id: first_commit
- name: Checkout the first commit in the PR
run: |
FIRST_COMMIT=$(git rev-list --reverse origin/${{ github.event.pull_request.base.ref }}..HEAD | head -n 1)
echo "first_commit_sha=$FIRST_COMMIT" >> $GITHUB_OUTPUT
git checkout "$FIRST_COMMIT"

- name: Validate the first commit from the PR
uses: commit-check/commit-check-action@v0.9.2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
commit: ${{ steps.first_commit.outputs.first_commit_sha }}
message: true
author-name: true
author-email: true
Expand Down
Loading