47
47
if [[ -z "$FROM" ]]; then
48
48
FROM="${{ github.event.pull_request.base.ref }}"
49
49
if [[ -n "$FROM" ]]; then
50
- echo "::notice ::Parsing base ref '$FROM'"
50
+ echo "::debug ::Parsing base ref '$FROM'"
51
51
# If we do have the base ref, it can be a branch name, so we want to
52
52
# parse it. This will be a pass through for a SHA
53
53
# via the event context, and we should try to find the default
65
65
if [[ -z "$FROM" ]]; then
66
66
# This finds the default branch name from the remote information, e.g. "main", and then parses it to a SHA
67
67
FROM="$(git show-ref --hash "$(git remote show $(git remote -v | grep push | awk '{print $2}') | grep 'HEAD branch' | awk '{print $3}')" | tail -n1)"
68
- echo "::notice ::Could not find base ref, trying to use default branch"
68
+ echo "::debug ::Could not find base ref, trying to use default branch"
69
69
if ! git merge-base --is-ancestor "$FROM" HEAD; then
70
70
echo "::warning::Default branch is not an ancestor of HEAD"
71
71
FROM=""
@@ -81,20 +81,20 @@ runs:
81
81
if ! git merge-base --is-ancestor "$FROM" HEAD; then
82
82
echo "::warning::Before commit $FROM is not an ancestor of HEAD"
83
83
else
84
- echo "::notice ::Checking commits since $FROM (usually the latest commit)."
84
+ echo "::debug ::Checking commits since $FROM (usually the latest commit)."
85
85
fi
86
86
fi
87
87
# Default to looking at the last 20 commits otherwise.
88
88
if [[ -z "$FROM" ]]; then
89
89
FROM="HEAD~20"
90
90
echo "::warning::Could not find commit range for commitlint"
91
- echo "::notice ::Checking 20 most recent commit messages."
91
+ echo "::debug ::Checking 20 most recent commit messages."
92
92
fi
93
93
CONFIG_FILE="${{ inputs.config-file }}"
94
94
if [[ -n "$CONFIG_FILE" ]]; then
95
95
CONFIG_FILE="--config $CONFIG_FILE"
96
96
fi
97
- echo "::notice ::Running commitlint"
97
+ echo "::debug ::Running commitlint"
98
98
commitlint \
99
99
$CONFIG_FILE \
100
100
--verbose \
0 commit comments