mirror of
https://github.com/reecetech/version-increment.git
synced 2026-08-18 11:07:50 +00:00
Add API call for git log
This commit is contained in:
@@ -63,7 +63,18 @@ fi
|
|||||||
## Conventional commits
|
## Conventional commits
|
||||||
if [[ "${scheme}" == 'conventional_commits' ]] ; then
|
if [[ "${scheme}" == 'conventional_commits' ]] ; then
|
||||||
# Get message from given commit
|
# Get message from given commit
|
||||||
commit_message=$(git log -1 --pretty=format:%B "${git_commit_sha}")
|
if [[ "${use_api:-}" == 'true' ]] ; then
|
||||||
|
commit_message="$(
|
||||||
|
curl -fsSL \
|
||||||
|
-H "Accept: application/vnd.github+json" \
|
||||||
|
-H "Authorization: Bearer ${github_token}" \
|
||||||
|
-H "X-GitHub-Api-Version: 2022-11-28" \
|
||||||
|
"${GITHUB_API_URL}/repos/${GITHUB_REPOSITORY}/commits/${git_commit_sha}" \
|
||||||
|
| jq -r '.commit.message'
|
||||||
|
)"
|
||||||
|
else
|
||||||
|
commit_message="$(git log -1 --pretty=format:%B "${git_commit_sha}")"
|
||||||
|
fi
|
||||||
|
|
||||||
# Check commit message header
|
# Check commit message header
|
||||||
found_match='false'
|
found_match='false'
|
||||||
|
|||||||
Reference in New Issue
Block a user