mirror of
https://github.com/rebelonion/Dantotsu.git
synced 2026-01-28 23:41:03 +00:00
feat: control format directly
This commit is contained in:
23
.github/workflows/beta.yml
vendored
23
.github/workflows/beta.yml
vendored
@@ -106,7 +106,6 @@ jobs:
|
||||
avatar_url=$(echo "$user_details" | jq -r '.avatar_url')
|
||||
echo "$name|$login|$avatar_url"
|
||||
}
|
||||
|
||||
# Additional information for the goats
|
||||
declare -A additional_info
|
||||
additional_info["ibo"]="\n Discord: <@951737931159187457>\n AniList: [takarealist112](<https://anilist.co/user/takarealist112/>)"
|
||||
@@ -121,7 +120,7 @@ jobs:
|
||||
|
||||
# Fetch contributors from GitHub
|
||||
contributors=$(curl -s -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
|
||||
"https://api.github.com/repos/Dantotsu-inc/FUCKYML/contributors")
|
||||
"https://api.github.com/repos/rebelonion/Dantotsu/contributors")
|
||||
|
||||
# Create a sorted list of contributors based on recent commit counts
|
||||
sorted_contributors=$(for login in $(echo "$contributors" | jq -r '.[].login'); do
|
||||
@@ -152,13 +151,20 @@ jobs:
|
||||
if [ -n "$extra_info" ]; then
|
||||
extra_info=$(echo "$extra_info" | sed 's/\\n/\n- /g')
|
||||
fi
|
||||
if [ -n "$developers" ]; then
|
||||
developers="${developers}\n"
|
||||
fi
|
||||
|
||||
developers="${developers}◗ **${name}** ${extra_info}
|
||||
# Construct the developer entry
|
||||
developer_entry="◗ **${name}** ${extra_info}
|
||||
- Github: [${login}](https://github.com/${login})
|
||||
- Commits: ${commit_count}"
|
||||
|
||||
# Add the entry to developers, with a newline if it's not the first entry
|
||||
if [ -n "$developers" ]; then
|
||||
developers="${developers}
|
||||
${developer_entry}"
|
||||
else
|
||||
developers="${developer_entry}"
|
||||
fi
|
||||
|
||||
committers_count=$((committers_count + 1))
|
||||
if [ $committers_count -eq 1 ]; then
|
||||
thumbnail_url="$avatar_url"
|
||||
@@ -167,9 +173,6 @@ jobs:
|
||||
fi
|
||||
fi
|
||||
done <<< "$sorted_contributors"
|
||||
|
||||
# Remove trailing newline and spaces
|
||||
developers=$(echo "$developers" | sed '$ s/[[:space:]]*$//')
|
||||
commit_messages=$(echo "$COMMIT_LOG" | sed 's/%0A/\n/g; s/^/\n/')
|
||||
|
||||
# Truncate field values
|
||||
@@ -180,7 +183,7 @@ jobs:
|
||||
if [ ${#commit_messages} -gt $max_length ]; then
|
||||
commit_messages="${commit_messages:0:$max_length}... (truncated)"
|
||||
fi
|
||||
|
||||
|
||||
# Construct Discord payload
|
||||
discord_data=$(jq -nc \
|
||||
--arg field_value "$commit_messages" \
|
||||
|
||||
Reference in New Issue
Block a user