ci: push, pull: debug logging for commit range

This commit is contained in:
Simon Michael 2022-04-20 22:21:11 -10:00
parent 7440075903
commit 5261ecabe0
2 changed files with 16 additions and 0 deletions

View File

@ -89,6 +89,14 @@ jobs:
shell: bash
run: |
RANGE=${BEFORE:-origin/master}..${GITHUB_HEAD_REF:+origin/$GITHUB_HEAD_REF}
echo debug: BEFORE: $BEFORE
echo debug: GITHUB_HEAD_REF: $GITHUB_HEAD_REF
echo debug: $RANGE
echo debug: log BEFORE: $(git log -1 $BEFORE | head -1)
echo debug: log origin/master: $(git log -1 origin/master | head -1)
echo debug: log GITHUB_HEAD_REF: $(git log -1 $GITHUB_HEAD_REF | head -1)
echo debug: log origin/GITHUB_HEAD_REF: $(git log -1 origin/$GITHUB_HEAD_REF | head -1)
echo debug: log RANGE: $(git log $RANGE | grep -E '^commit')
if git rev-list --quiet $RANGE
then tools/commitlint $RANGE
else echo "could not identify commits, not checking them"

View File

@ -92,6 +92,14 @@ jobs:
shell: bash
run: |
RANGE=${BEFORE:-origin/master}..${GITHUB_HEAD_REF:+origin/$GITHUB_HEAD_REF}
echo debug: BEFORE: $BEFORE
echo debug: GITHUB_HEAD_REF: $GITHUB_HEAD_REF
echo debug: $RANGE
echo debug: log BEFORE: $(git log -1 $BEFORE | head -1)
echo debug: log origin/master: $(git log -1 origin/master | head -1)
echo debug: log GITHUB_HEAD_REF: $(git log -1 $GITHUB_HEAD_REF | head -1)
echo debug: log origin/GITHUB_HEAD_REF: $(git log -1 origin/$GITHUB_HEAD_REF | head -1)
echo debug: log RANGE: $(git log $RANGE | grep -E '^commit')
if git rev-list --quiet $RANGE
then tools/commitlint $RANGE
else echo "could not identify commits, not checking them"