Commit 0827db61 authored by John Jarvis's avatar John Jarvis

Merge branch 'jarv/add-service-labels' into 'master'

Jarv/add service labels

See merge request gl-infra/oncall-robot-assistant!22
parents 96031935 6e971088
Pipeline #29382087 passed with stage
in 2 minutes and 19 seconds
......@@ -16,7 +16,11 @@ projects:
report_project:
# Where to create the issue
# oncall_robot
id: 3950829
# id: 3950829
# infra: 1304532
# production 7444821
id: 7444821
# Number of days to look back for the
# oncall report
......
......@@ -55,9 +55,8 @@ func (r *Report) CreateReportIssue(title string) string {
// weeklyOpsGraphs := r.uploadGraphs(graphs)
weeklyOpsGraphs := []WeeklyOpsGraph{}
desc := r.generateTemplate(weeklyOpsGraphs)
// issue := r.Helpers.GitLab.CreateIssue(title, desc, r.Config.Projects.ReportProject.ID)
// return issue.WebURL
return desc
issue := r.Helpers.GitLab.CreateIssue(title, desc, r.Config.Projects.ReportProject.ID)
return issue.WebURL
}
// Generate an issue using a template
......@@ -159,7 +158,7 @@ func (r *Report) generateTemplate(weeklyOpsGraphs []WeeklyOpsGraph) string {
func genIssueInfo(p *gitlab.Issue) *Issue {
issue := Issue{}
created := p.CreatedAt.Format(time.RFC822)
created := p.CreatedAt.Format(time.RFC3339)
if p.Assignee.Username == "" {
p.Assignee.Username = "unassigned"
}
......
......@@ -70,7 +70,7 @@
#### Incident Issues
{{- range .IncidentIssues }}
* {{.CreatedAt}} - [{{.Summary}}]({{.URL}}) - {{.Assignee }} | {{range .SeverityLabels}}~{{.}}{{ end }} | {{range .ServiceLabels}}~{{.}}{{ end }}
* {{.CreatedAt}} - [{{.Summary}}]({{.URL}}) - {{.Assignee }} |{{range .SeverityLabels}} ~{{.}}{{ end }} |{{range .ServiceLabels}} ~"{{.}}"{{ end }} | `{{.URL}}`
{{- end }}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment