Skip to content

feat: check a pull request's commits without fetch-depth: 0 #753

feat: check a pull request's commits without fetch-depth: 0

feat: check a pull request's commits without fetch-depth: 0 #753

Workflow file for this run

name: Commit Check
on:
pull_request:
branches: 'main'
types: [opened, synchronize, reopened, edited]
workflow_dispatch:
jobs:
commit-check:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
permissions:
contents: read
pull-requests: write
steps:
- uses: actions/checkout@v7.0.1
with:
fetch-depth: 0 # Required for merge-base checks
- uses: ./ # self test
with:
message: true
branch: true
author-name: true
author-email: true
# Report from the ubuntu job only. Every leg checks the same commits
# against the same rules, so the other two produce a byte-identical
# report — three copies of it on the run page, and the matrix is here
# to prove the action runs on each OS, not to say the same thing
# three times.
job-summary: ${{ matrix.os == 'ubuntu-latest' }}
pr-comments: ${{ github.event_name == 'pull_request' && matrix.os == 'ubuntu-latest' }}
pr-title: true