Skip to content

Commit

Permalink
Merge pull request #18 from gooddata/jimi/lint
Browse files Browse the repository at this point in the history
fix(commit-lint): recognize also Update as renovate commit
  • Loading branch information
jimirocks authored Nov 28, 2024
2 parents 4381b5f + d0b559a commit fa6fd7f
Showing 1 changed file with 6 additions and 2 deletions.
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

0 comments on commit fa6fd7f

Please sign in to comment.