@vlci/valenciaalminut 30.0.0 → 31.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,38 @@
1
+ #!/usr/bin/env bash
2
+ if [ -z "$1" ]; then
3
+ echo "Missing argument (commit message). Did you try to run this manually?"
4
+ exit 1
5
+ fi
6
+
7
+ commitTitle="$(cat $1 | head -n1)"
8
+
9
+ # ignore merge requests
10
+ if echo "$commitTitle" | grep -qE "Merge branch"; then
11
+ echo "Commit hook: ignoring branch merge"
12
+ exit 0
13
+ fi
14
+
15
+ # check semantic versioning scheme
16
+ if ! echo "$commitTitle" | grep -qE '^(feat|fix|docs|style|refactor|perf|test|chore|build|ci|revert)(\([a-z0-9\s\-\_\,]+\))?!?:\s(JIRA-([0-9]{4,10}))\s\w'; then
17
+ echo "Your commit message did not follow semantic versioning: $commitTitle"
18
+ echo ""
19
+ echo "Format: <type>(<optional-scope>)<optional-!-breaking-change>: JIRA-xxxx <subject>"
20
+ echo "Example 1: feat(api): JIRA-2531 add endpoint"
21
+ echo "Example 2 (Breaking change): feat!: JIRA-3120 change parameters in function formatDate"
22
+ echo ""
23
+ echo "Breaking changes: use ! after <type> and <scope> to express that the change is a breaking change"
24
+ echo "Valid types: build|chore|ci|docs|feat|fix|perf|refactor|revert|style|test"
25
+ echo " build: Changes that affect the build system or external dependencies (example scopes: gulp, npm)"
26
+ echo " ci: Changes to our CI configuration files and scripts (examples: GitLab, Jenkins)"
27
+ echo " docs: Documentation only changes"
28
+ echo " feat: A new feature"
29
+ echo " fix: A bug fix"
30
+ echo " perf: A code change that improves performance"
31
+ echo " refactor: A code change that neither fixes a bug nor adds a feature"
32
+ echo " test: Adding missing tests or correcting existing tests"
33
+ echo ""
34
+ echo "Please see"
35
+ echo "- https://github.com/angular/angular.js/blob/master/DEVELOPERS.md#commit-message-format"
36
+ echo "- https://www.conventionalcommits.org/en/v1.0.0/#summary"
37
+ exit 1
38
+ fi
package/.husky/pre-commit CHANGED
File without changes