Skip to content

Add FDP update automation for EDPM deployments #36

Add FDP update automation for EDPM deployments

Add FDP update automation for EDPM deployments #36

name: Check if commit message body is not too short
on:
pull_request:
types: [opened, synchronize, edited, reopened]
jobs:
verify-body-length:
runs-on: ubuntu-latest
# set as non-voting for now.
continue-on-error: true
permissions:
contents: write
pull-requests: write
repository-projects: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Dump commit message to file
run: |
git fetch origin ${{ github.event.pull_request.head.sha }}
git log -1 --pretty=format:"%B" ${{ github.event.pull_request.head.sha }} > commit-message-file
- name: Run commit message check
id: bodylength
run: |
set +e
./scripts/git-check-commit-body-length.sh commit-message-file > result.log 2>&1
EXIT_CODE=$?
echo "exit_code=$EXIT_CODE" >> $GITHUB_OUTPUT
cat result.log
- name: Comment on PR if body length check failed
if: steps.bodylength.outputs.exit_code != '0'
uses: peter-evans/create-or-update-comment@v5
with:
issue-number: ${{ github.event.pull_request.number }}
body-path: ./result.log
reactions: confused