Update quay.io/artemiscloud/activemq-artemis-operator Docker tag to v1.2.7 #98
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: 'Pull Request Check' | |
on: | |
pull_request: | |
types: | |
- opened | |
- edited | |
- reopened | |
- synchronize | |
jobs: | |
check-commit-message: | |
name: Check Commit Message | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout the repo | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Get Commit Message | |
run: | | |
nlines=-1 | |
for (( N=1; N<=${{github.event.pull_request.commits}}; N++ )) | |
do | |
prev_lines=$(($nlines+1)) | |
nlines=0 | |
while IFS= read -r line | |
do | |
nlines=$((nlines+1)) | |
if (( $nlines == $prev_lines+1 )); then | |
if ! [[ "$line" =~ ^\[#[0-9]+\]\ .+$|^\[NO-ISSUE\]\ .+$ ]]; then | |
echo "[ commit $N ]: Commit message should begin with [#nnn] or [NO-ISSUE], followed by a space." | |
echo "but it is: $line" | |
exit 1 | |
fi | |
fi | |
done <<< $(git log --format=%B -n $N ${{github.event.pull_request.head.sha}}) | |
done |