@@ -165,56 +165,52 @@ jobs:
165165 ref_kind="branch"
166166 branch="${ref:11}"
167167
168- printf " Get default branch name ... "
168+ printf "Get default branch name ... "
169169 defaultBranch=$(gh repo view "${{ github.repository }}" --json defaultBranchRef --jq '.defaultBranchRef.name' 2>&1)
170170 if [[ $? -eq 0 ]]; then
171171 printf "${ANSI_LIGHT_GREEN} [OK]\n"
172172
173173 default_branch="${defaultBranch}"
174- printf " default_branch=%s\n" "${default_branch}"
174+ printf " default_branch=%s\n" "${default_branch}"
175175 else
176176 printf "${ANSI_LIGHT_RED} [FAILED]\n"
177- printf " %s\n" "${default_branch}"
177+ printf " %s\n" "${default_branch}"
178178 fi
179179
180180 printf "Commit checks:\n"
181+ printf " Commit kind "
182+ if [[ -z "$(git rev-list -1 --merges ${{ github.sha }}~1..${{ github.sha }})" ]]; then
183+ is_regular_commit="true"
184+ printf "${ANSI_LIGHT_YELLOW}[REGULAR]${ANSI_NOCOLOR}\n"
185+ else
186+ is_merge_commit="true"
187+ printf "${ANSI_LIGHT_GREEN}[MERGE]${ANSI_NOCOLOR}\n"
188+ fi
181189
190+ printf "Branch checks:\n"
182191 if [[ "${branch}" == "${defaultBranch}" ]]; then
183192 on_default_branch="true"
184-
185- printMessage="default branch"
186- printBranch="${defaultBranch}"
193+ printf " Commit on default branch ${ANSI_LIGHT_BLUE}'%s'${ANSI_NOCOLOR}\n" "${defaultBranch}"
187194 fi
188195
189196 if [[ "${branch}" == "${{ inputs.main_branch }}" ]]; then
190197 on_main_branch="true"
191-
192- printMessage="main branch"
193- printBranch="${{ inputs.main_branch }}"
198+ printf " Commit on main branch ${ANSI_LIGHT_BLUE}'%s'${ANSI_NOCOLOR}\n" "${{ inputs.main_branch }}"
194199 fi
195200
196201 if [[ "${branch}" == "${{ inputs.release_branch }}" ]]; then
197202 on_release_branch="true"
198-
199- printMessage="release branch"
200- printBranch="${{ inputs.release_branch }}"
203+ printf " Commit on release branch ${ANSI_LIGHT_BLUE}'%s'${ANSI_NOCOLOR}\n" "${{ inputs.release_branch }}"
201204 fi
202205
203206 if [[ "${branch}" == "${{ inputs.development_branch }}" ]]; then
204207 on_dev_branch="true"
205-
206- printMessage="development branch"
207- printBranch="${{ inputs.development_branch }}"
208+ printf " Commit on development branch ${ANSI_LIGHT_BLUE}'%s'${ANSI_NOCOLOR}\n" "${{ inputs.development_branch }}"
208209 fi
209210
210- if [[ -z "$(git rev-list -1 --merges ${{ github.sha }}~1..${{ github.sha }})" ]]; then
211- is_regular_commit="true"
212- printf " ${ANSI_LIGHT_YELLOW}regular commit${ANSI_NOCOLOR} on ${printMessage} ${ANSI_LIGHT_BLUE}'%s'${ANSI_NOCOLOR}\n" "${printBranch}"
213- else
214- is_merge_commit="true"
215- printf " ${ANSI_LIGHT_GREEN}merge commit${ANSI_NOCOLOR} on ${printMessage} ${ANSI_LIGHT_BLUE}'%s'${ANSI_NOCOLOR}\n" "${printBranch}"
216-
217- printf " Merge kind "
211+ if [[ "${is_merge_commit}" == "true" ]]; then
212+ printf "Release checks:\n"
213+ printf " Release kind "
218214 if [[ "${on_main_branch}" == "true" ]]; then
219215 is_release_commit="true"
220216 printf "${ANSI_LIGHT_GREEN}[RELEASE]${ANSI_NOCOLOR}\n"
0 commit comments