Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(commit-lint): recognize also Update as renovate commit #18

Merged
merged 2 commits into from
Nov 28, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions .github/workflows/commit-lint-shell.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,11 @@ jobs:
COMMIT_HASH=$(echo "$COMMIT" | awk '{print $1}')
COMMIT_SUBJECT=$(echo "$COMMIT" | cut -d' ' -f2-)
COMMIT_VIOLATIONS=""


if [[ "$COMMIT_SUBJECT" =~ ^revert ]]; then
continue
fi

if ! [[ "$COMMIT_SUBJECT" =~ $CONVENTIONAL_REGEX ]]; then
COMMIT_VIOLATIONS+=":x: does not follow Conventional Commits guidelines\n"
fi
Expand All @@ -60,7 +64,7 @@ jobs:

REPO_NAME="${{ github.repository }}"
if [[ "$REPO_NAME" =~ ^(.*/)?(gdc-nas|gdc-ui|gooddata-ui-sdk|gdc-panther)$ ]]; then
if [[ ! "$COMMIT_SUBJECT" =~ ^chore.*:[[:space:]]update ]]; then
if [[ ! "$COMMIT_SUBJECT" =~ ^chore.*:[[:space:]][Uu]pdate ]]; then
TRAILERS=$(git show -s --format=%B "$COMMIT_HASH" | git interpret-trailers --parse)
if ! echo "$TRAILERS" | grep -iqE '^risk:\s*(nonprod|low|high)'; then
COMMIT_VIOLATIONS+=":x: does not contain a valid risk trailer\n"
Expand Down
Loading