Skip to content

Commit

Permalink
fix not voted pools
Browse files Browse the repository at this point in the history
  • Loading branch information
Ryun1 committed Jan 9, 2025
1 parent 04306c0 commit 2c5fa73
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions .github/workflows/update-plomin-votes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
spo_yes=$(echo "$response" | jq -r '.[0].pool_yes_votes_cast')
spo_no=$(echo "$response" | jq -r '.[0].pool_no_votes_cast')
spo_abstain=$(echo "$response" | jq -r '.[0].pool_abstain_votes_cast')
spo_not_voted=$((2787 - spo_yes - spo_no - spo_abstain))
spo_not_voted=$(2787 - $spo_yes - $spo_no - $spo_abstain)
spo_yes_stake=$(echo "$response" | jq -r '.[0].pool_active_yes_vote_power')
spo_no_stake=$(echo "$response" | jq -r '.[0].pool_active_no_vote_power')
Expand Down Expand Up @@ -96,20 +96,21 @@ jobs:
cc_abstain_pct=${{ env.cc_abstain_pct }}
cc_not_voted_pct=${{ env.cc_not_voted_pct }}
spo_yes_pct=${{ env.spo_yes_pct }}
spo_no_not_pct=${{ env.spo_no_not_pct }}
spo_yes=${{ env.spo_yes }}
spo_no=${{ env.spo_no }}
spo_abstain=${{ env.spo_abstain }}
spo_yes_stake_formatted=${{ env.spo_yes_stake_formatted }}
spo_no_stake_formatted=${{ env.spo_no_stake_formatted }}
spo_abstain_stake_formatted=${{ env.spo_abstain_stake_formatted }}
spo_not_voted_stake_formatted=${{ env.spo_not_voted_stake_formatted }}
spo_yes_pct=${{ env.spo_yes_pct }}
spo_no_not_pct=${{ env.spo_no_not_pct }}
current_datetime=$(date +"%Y-%m-%d %H:%M:%S")
sed -i "s/| Yes |.*|/| Yes | $yes_percentage% |/" ./gitbook/plomin-upgrade/chang-upgrade-2-readiness/README.md
sed -i "s/| No + Not Voted |.*|/| No + Not Voted | $no_not_voted_percentage% |/" ./gitbook/plomin-upgrade/chang-upgrade-2-readiness/README.md
sed -i "s/| Yes |.*|/| Yes | $spo_yes_pct% |/" ./gitbook/plomin-upgrade/chang-upgrade-2-readiness/README.md
sed -i "s/| No + Not Voted |.*|/| No + Not Voted | $spo_no_not_pct% |/" ./gitbook/plomin-upgrade/chang-upgrade-2-readiness/README.md
sed -i "s/SPO vote summary last updated: .*/SPO vote summary last updated: $current_datetime/" ./gitbook/plomin-upgrade/chang-upgrade-2-readiness/README.md
sed -i "s/| Yes |.*|/| Yes | $spo_yes | $spo_yes_stake_formatted |/" ./gitbook/plomin-upgrade/chang-upgrade-2-readiness/README.md
Expand Down

0 comments on commit 2c5fa73

Please sign in to comment.