Skip to content

Commit

Permalink
Merge branch 'release/v0.1.50'
Browse files Browse the repository at this point in the history
* release/v0.1.50:
  chore: update delivery message title
  • Loading branch information
namnhce committed Jul 21, 2023
2 parents cf6483d + 884ecd5 commit e1c8d8d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pkg/service/discord/discord.go
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,7 @@ func calculateTopContributor(topContributors []view.TopContributor) string {

func (d *discordClient) DeliveryMetricWeeklyReport(deliveryMetric *view.DeliveryMetricWeeklyReport, leaderBoard *view.WeeklyLeaderBoard, channelID string) (*discordgo.Message, error) {
var messageEmbed []*discordgo.MessageEmbedField
content := "\n\n"
content := "*Track software team's performance. Encourages competition and collaboration. Optimizes project delivery. Promotes accountability.*\n\n"

if leaderBoard != nil {
leaderBoardStr := getLeaderboardAsString(leaderBoard.Items)
Expand Down Expand Up @@ -520,6 +520,7 @@ func (d *discordClient) DeliveryMetricWeeklyReport(deliveryMetric *view.Delivery
avgEffortChange = fmt.Sprintf("%v%v%%", emojiDown, deliveryMetric.AvgEffortChangePercentage)
}

date := deliveryMetric.CurrentWeek.Date.Format("02 Jan 2006")
currentWeek := fmt.Sprintf("\n**Current Week - %v**\n", deliveryMetric.CurrentWeek.Date.Format("02 Jan 2006"))
currentWeek += fmt.Sprintf("%v`Total Point. %vpts` (%v)\n", getEmoji("STAR_ANIMATED"), deliveryMetric.CurrentWeek.TotalPoints, pointChange)
currentWeek += fmt.Sprintf("%v`Effort. %vhrs` (%v)\n", getEmoji("CLOCK_NEW"), deliveryMetric.CurrentWeek.Effort, effortChange)
Expand All @@ -529,7 +530,7 @@ func (d *discordClient) DeliveryMetricWeeklyReport(deliveryMetric *view.Delivery
content += currentWeek

msg := &discordgo.MessageEmbed{
Title: "**🏆 DELIVERY WEEKLY REPORT 🏆**",
Title: "**🏆 DELIVERY WEEKLY REPORT 🏆**" + " - " + strings.ToUpper(date),
Fields: messageEmbed,
Description: content,
Footer: &discordgo.MessageEmbedFooter{
Expand Down

0 comments on commit e1c8d8d

Please sign in to comment.