mirror of
https://github.com/floci-io/floci.git
synced 2026-11-24 06:20:24 -05:00
Combines the open dependabot updates with the vulnerable-dependency pins: - quarkus platform 3.36.0 -> 3.36.3, apicurio 2.6.9.Final -> 2.6.13.Final - graphql-java 22.0 -> 26.0, neo4j-java-driver 5.28.5 -> 6.1.0 (test) - import jackson-bom 2.21.4 and pin wire-runtime 6.3.0 - compat tests: aws sdk 2.44.14, netty-bom 4.1.135.Final, postgresql 42.7.11, jackson-bom 2.18.8, kafka-clients 3.9.2, commons-lang3 3.18.0 - actions/checkout v7.0.0, configure-aws-credentials v6.2.0, setup-graalvm pin
64 lines
2.2 KiB
YAML
64 lines
2.2 KiB
YAML
name: Conventional Commits
|
|
|
|
on:
|
|
pull_request:
|
|
types: [opened, edited, synchronize, reopened]
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
lint-commits:
|
|
name: Commits follow Conventional Commits
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v7.0.0
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Validate commit messages
|
|
env:
|
|
BASE_SHA: ${{ github.event.pull_request.base.sha }}
|
|
HEAD_SHA: ${{ github.event.pull_request.head.sha }}
|
|
run: |
|
|
# Conventional Commits pattern:
|
|
# <type>[optional scope]: <description>
|
|
#
|
|
# Types recognised by semantic-release (commit-analyzer defaults):
|
|
# feat, fix, perf, revert, docs, style, chore, refactor, test, build, ci
|
|
#
|
|
# Breaking changes are signalled by appending ! before the colon:
|
|
# feat!: or feat(scope)!:
|
|
#
|
|
# Merge commits are skipped automatically via --no-merges.
|
|
#
|
|
# References:
|
|
# https://www.conventionalcommits.org/en/v1.0.0/
|
|
|
|
PATTERN='^(feat|fix|perf|revert|docs|style|chore|refactor|test|build|ci)(\([-a-zA-Z0-9_.,]+\))?!?: .{1,}'
|
|
FAILED=0
|
|
|
|
while IFS= read -r msg; do
|
|
if echo "$msg" | grep -qE "$PATTERN"; then
|
|
echo "ok: $msg"
|
|
else
|
|
echo "::error::Commit does not follow Conventional Commits: $msg"
|
|
echo ""
|
|
echo " Got: $msg"
|
|
echo ""
|
|
echo " Expected format: <type>[optional scope]: <description>"
|
|
echo " Examples:"
|
|
echo " feat(dynamodb): add PartiQL ExecuteStatement support"
|
|
echo " fix(s3): make us-east-1 bucket creation idempotent"
|
|
echo " chore: release 1.5.16"
|
|
echo " feat!: remove legacy endpoint"
|
|
echo ""
|
|
echo " Valid types: feat, fix, perf, revert, docs, style, chore, refactor, test, build, ci"
|
|
echo " See: https://www.conventionalcommits.org/en/v1.0.0/"
|
|
FAILED=1
|
|
fi
|
|
done < <(git log --no-merges --format="%s" "$BASE_SHA".."$HEAD_SHA")
|
|
|
|
exit $FAILED
|