mirror of
https://github.com/mihonapp/mihon-preview.git
synced 2024-11-10 04:37:24 +01:00
Fetch commit details from GitHub API instead to get proper usernames
This commit is contained in:
parent
d97baea8fc
commit
7b23fbaeae
11
.github/workflows/build_app.yml
vendored
11
.github/workflows/build_app.yml
vendored
@ -51,14 +51,19 @@ jobs:
|
||||
|
||||
commit_count=$(git rev-list --count HEAD)
|
||||
echo "COMMIT_COUNT=$commit_count" >> $GITHUB_ENV
|
||||
echo "CURRENT_SHA=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
|
||||
current_sha=$(git rev-parse --short HEAD)
|
||||
echo "CURRENT_SHA=$current_sha" >> $GITHUB_ENV
|
||||
|
||||
prev_commit_count=$(echo "${{ steps.last_release.outputs.tag_name }}" | sed -e "s/^r//")
|
||||
commit_count_diff=$(expr $commit_count - $prev_commit_count)
|
||||
echo "PREV_RELEASE_SHA=$(git rev-parse --short HEAD~$commit_count_diff)" >> $GITHUB_ENV
|
||||
prev_release_sha=$(git rev-parse --short HEAD~$commit_count_diff)
|
||||
echo "PREV_RELEASE_SHA=$prev_release_sha" >> $GITHUB_ENV
|
||||
|
||||
echo "COMMIT_LOGS<<{delimiter}
|
||||
$(git log HEAD~$commit_count_diff..HEAD --reverse --pretty=format:'- %s (@%an)')
|
||||
$(curl -H "Accept: application/vnd.github.v3+json" \
|
||||
"https://api.github.com/repos/tachiyomiorg/tachiyomi/compare/$prev_release_sha...$current_sha" \
|
||||
| jq '[.commits[]|{message:(.commit.message | split("\n")), username:.author.login}]' \
|
||||
| jq -r '.[]|"- \(.message | first) (@\(.username))"')
|
||||
{delimiter}" >> $GITHUB_ENV
|
||||
|
||||
- name: Set up keystore
|
||||
|
Loading…
Reference in New Issue
Block a user