Skip to content

Commit

Permalink
SRE-2509 common: do not skip tests on empty commits
Browse files Browse the repository at this point in the history
ci/doc_only_change.sh shall not return 1 if it detects
no changes since the last execution (or reference branch).

"Doc-only: false" is no longer needed to fix this problem

Required-githooks: true

Signed-off-by: Tomasz Gromadzki <[email protected]>
  • Loading branch information
grom72 committed Sep 26, 2024
1 parent 0dfe144 commit c0e8827
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion ci/doc_only_change.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,9 @@ if ! merge_base="$(git merge-base "FETCH_HEAD" HEAD)"; then
# nothing to do here except exit as if it's not a doc-only change
exit 0
fi
if ! git diff --no-commit-id --name-only "$merge_base" HEAD | grep -q -e ".*"; then
echo "No changes detected, full validation is expected"
exit 0
fi
git diff --no-commit-id --name-only "$merge_base" HEAD | \
grep -v -e "^docs/" -e "\.md$"
grep -v -e "^docs/" -e "\.md$" -e "^.*LICENSE.*$"

0 comments on commit c0e8827

Please sign in to comment.