diff --git a/.github/workflows/beta.yml b/.github/workflows/beta.yml
index 8a20867db0..313a0be5e6 100644
--- a/.github/workflows/beta.yml
+++ b/.github/workflows/beta.yml
@@ -120,11 +120,21 @@ 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]()"
additional_info["aayush262"]="\n Discord: <@918825160654598224>\n AniList: [aayush262]()"
- additional_info["rebelonion"]="\n Discord: <@714249925248024617>\n AniList: [rebelonion]()\n PornHub: [rebelonion]()"
+ additional_info["rebelonion"]="\n Discord: <@714249925248024617>\n AniList: [rebelonion]()\n PornHub: [rebelonion]()"
+
+ # Decimal color codes for contributors
+ declare -A contributor_colors
+ default_color="#ff25f9"
+ contributor_colors["ibo"]="#ff7500"
+ contributor_colors["aayush262"]="#5d689d"
+ contributor_colors["Sadwhy"]="#ff7e95"
+ contributor_colors["rebelonion"]="#d4e5ed"
+ hex_to_decimal() { printf '%d' "0x${1#"#"}"; }
# Count recent commits and create an associative array
declare -A recent_commit_counts
@@ -150,6 +160,7 @@ jobs:
top_contributor=""
top_contributor_count=0
top_contributor_avatar=""
+ embed_color=$default_color
# Process contributors in the new order
while read -r login; do
@@ -164,11 +175,14 @@ jobs:
# Update top contributor information
if [ $commit_count -gt $max_commits ]; then
max_commits=$commit_count
- top_contributor="$login"
+ top_contributors=("$login")
top_contributor_count=1
top_contributor_avatar="$avatar_url"
+ embed_color=$(hex_to_decimal "${contributor_colors[$name]:-$default_color}")
elif [ $commit_count -eq $max_commits ]; then
+ top_contributors+=("$login")
top_contributor_count=$((top_contributor_count + 1))
+ embed_color=$default_color
fi
# Get commit count for this contributor on the dev branch
@@ -191,16 +205,16 @@ jobs:
else
developers="${developer_entry}"
fi
-
committers_count=$((committers_count + 1))
fi
done <<< "$sorted_contributors"
- # Set the thumbnail URL based on top contributor(s)
+ # Set the thumbnail URL and color based on top contributor(s)
if [ $top_contributor_count -eq 1 ]; then
thumbnail_url="$top_contributor_avatar"
else
thumbnail_url="https://i.imgur.com/5o3Y9Jb.gif"
+ embed_color=$default_color
fi
# Truncate field values
@@ -220,12 +234,13 @@ jobs:
--arg footer_text "Version $VERSION" \
--arg timestamp "$(date -u +%Y-%m-%dT%H:%M:%S.000Z)" \
--arg thumbnail_url "$thumbnail_url" \
+ --argjson embed_color "$embed_color" \
'{
"content": "<@&1225347048321191996>",
"embeds": [
{
"title": "New Alpha-Build dropped",
- "color": 15532323,
+ "color": $embed_color,
"fields": [
{
"name": "Commits:",