mirror of
https://github.com/jgm/pandoc.git
synced 2026-07-10 11:27:06 +00:00
b7ce1047c6
Bumps [actions/checkout](https://github.com/actions/checkout) from 6 to 7. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v6...v7) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: '7' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
33 lines
1001 B
YAML
33 lines
1001 B
YAML
name: commit-validation-pr
|
|
on: [pull_request]
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
check-commit-msg-length:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v7
|
|
with:
|
|
fetch-depth: 0
|
|
- name: Check commit message length
|
|
run: |
|
|
git log ${{ github.event.pull_request.base.sha }}..${{ github.event.pull_request.head.sha }} | (
|
|
longlines=0
|
|
while IFS='' read -r line; do
|
|
if [ "${#line}" -gt 78 ] ; then
|
|
if echo "$line" | grep -q '^\s*https://\S*\s*$'; then
|
|
echo "Ignoring long line with URL."
|
|
else
|
|
echo "Overlong line: ${line}" >&2
|
|
if echo "$line" | grep -q 'https://'; then
|
|
echo "Put a long URL on a line by itself."
|
|
fi
|
|
longlines=$(( longlines + 1 ))
|
|
fi
|
|
fi
|
|
done
|
|
[ "${longlines}" -eq 0 ]
|
|
)
|