@sasjs/adapter 4.19.0 → 4.19.1

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.
@@ -7,12 +7,33 @@ GREEN="\033[1;32m"
7
7
  commit_message=$(cat "$1")
8
8
 
9
9
  if (echo "$commit_message" | grep -Eq "^(build|chore|ci|docs|feat|fix|perf|refactor|revert|style|test)(\([a-z0-9 -\*]+\))?!?: .+$") then
10
+ :
11
+ else
12
+ echo "${RED}❌ Commit message does not meet the Conventional Commit standard!"
13
+ echo "An example of a valid message is:"
14
+ echo " feat(login): add the 'remember me' button"
15
+ echo "ℹ More details at: https://www.conventionalcommits.org/en/v1.0.0/#summary"
16
+ exit 1
17
+ fi
18
+
19
+ # semantic-release releases only feat, fix and perf, plus any type carrying a
20
+ # breaking `!`. Every other type merges without a release, which leaves the
21
+ # publish job with nothing to publish - so say so, and require the author to
22
+ # opt out in the message when that is what they intend.
23
+ # `[skip ci]` is accepted alongside `[skip release]` because the release commit
24
+ # semantic-release writes itself is a `chore` that carries it.
25
+ if (echo "$commit_message" | grep -Eq "^(feat|fix|perf)(\([a-z0-9 -\*]+\))?!?: .+$") then
10
26
  echo "${GREEN} ✔ Commit message meets Conventional Commit standards"
11
27
  exit 0
12
28
  fi
13
29
 
14
- echo "${RED}❌ Commit message does not meet the Conventional Commit standard!"
15
- echo "An example of a valid message is:"
16
- echo " feat(login): add the 'remember me' button"
17
- echo "ℹ More details at: https://www.conventionalcommits.org/en/v1.0.0/#summary"
18
- exit 1
30
+ if (echo "$commit_message" | grep -Eq "\[skip (release|ci)\]") then
31
+ echo "${GREEN} ✔ Conventional commit, marked as not for release"
32
+ exit 0
33
+ fi
34
+
35
+ echo "${RED}❌ Commit type would not produce a release!"
36
+ echo "semantic-release releases only feat, fix and perf (or a breaking ! change)."
37
+ echo "If this commit is not meant to release, say so in the message:"
38
+ echo " chore(deps): refresh the lockfile [skip release]"
39
+ exit 1
@@ -0,0 +1,25 @@
1
+ # Hooks for the pre-commit framework - https://pre-commit.com
2
+ #
3
+ # The repo also ships native hooks in .git-hooks/: a prettier check before the
4
+ # commit, and the Conventional Commits and release checks on the message. The
5
+ # `prepare` script activates them by setting core.hooksPath - but .npmrc sets
6
+ # ignore-scripts=true, so `npm i` never runs it and a fresh clone commits
7
+ # unchecked.
8
+ #
9
+ # This file is the standard route instead: install the framework once with
10
+ # `pre-commit install`, and the secret scan and the message check run on every
11
+ # commit. gitleaks is pinned to an exact release tag, and the message hook
12
+ # calls the script the native hooks already use, so there is one implementation
13
+ # of the rules.
14
+ repos:
15
+ - repo: https://github.com/gitleaks/gitleaks
16
+ rev: v8.30.1
17
+ hooks:
18
+ - id: gitleaks
19
+ - repo: local
20
+ hooks:
21
+ - id: commit-msg
22
+ name: conventional commit, with a release-bearing type
23
+ entry: .git-hooks/commit-msg
24
+ language: script
25
+ stages: [commit-msg]