committed by
GitHub Enterprise
parent
c8f8a3bcc7
commit
2eed0f966a
@@ -18,10 +18,16 @@ func IncidentSummarySection(incident *incident.IncidentEntity, team *team.TeamEn
|
||||
}
|
||||
|
||||
func buildTypeAndChannelSectionBlock(incident *incident.IncidentEntity, teamName, severityName, incidentStatus string) *slack.SectionBlock {
|
||||
fields := []*slack.TextBlockObject{
|
||||
slack.NewTextBlockObject("mrkdwn", fmt.Sprintf("*<@%s>* \n*%s* - *%s*\n", incident.CreatedBy, incident.IncidentName, incident.Title), false, false),
|
||||
slack.NewTextBlockObject("mrkdwn", "\n", false, false),
|
||||
slack.NewTextBlockObject("mrkdwn", incident.Description, false, false),
|
||||
fields := []*slack.TextBlockObject{}
|
||||
fields = append(fields, slack.NewTextBlockObject("mrkdwn", fmt.Sprintf("*<@%s>* \n*%s* - *%s*\n", incident.CreatedBy, incident.IncidentName, incident.Title), false, false))
|
||||
|
||||
if incident.Description != "" {
|
||||
fields = append(fields, slack.NewTextBlockObject("mrkdwn", "\n", false, false),
|
||||
slack.NewTextBlockObject("mrkdwn", incident.Description, false, false))
|
||||
}
|
||||
|
||||
fields = append(fields,
|
||||
|
||||
slack.NewTextBlockObject("mrkdwn", "\n", false, false),
|
||||
slack.NewTextBlockObject("mrkdwn", fmt.Sprintf("*Type*\n%s", teamName), false, false),
|
||||
slack.NewTextBlockObject("mrkdwn", fmt.Sprintf("*Channel*\n<#%s>", incident.SlackChannel), false, false),
|
||||
@@ -29,9 +35,9 @@ func buildTypeAndChannelSectionBlock(incident *incident.IncidentEntity, teamName
|
||||
slack.NewTextBlockObject("mrkdwn", fmt.Sprintf("*Ticket*\n%s", "Integration Disabled"), false, false),
|
||||
slack.NewTextBlockObject("mrkdwn", fmt.Sprintf("*Status*\n%s", incidentStatus), false, false),
|
||||
slack.NewTextBlockObject("mrkdwn", fmt.Sprintf("*Meeting*\n%s", "Integration Disabled"), false, false),
|
||||
}
|
||||
block := slack.NewSectionBlock(nil, fields, nil)
|
||||
)
|
||||
|
||||
block := slack.NewSectionBlock(nil, fields, nil)
|
||||
return block
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user