From 0fc34771e8fde4c54e7448f69597029e2571a9c6 Mon Sep 17 00:00:00 2001 From: Jacob Bednarz Date: Fri, 6 Oct 2023 11:26:57 +1100 Subject: [PATCH] add UserID field --- tools/cmd/sync-github-issue-to-jira/main.go | 58 +++++++++++---------- 1 file changed, 30 insertions(+), 28 deletions(-) diff --git a/tools/cmd/sync-github-issue-to-jira/main.go b/tools/cmd/sync-github-issue-to-jira/main.go index 6bc659480f..38b1361cd8 100644 --- a/tools/cmd/sync-github-issue-to-jira/main.go +++ b/tools/cmd/sync-github-issue-to-jira/main.go @@ -38,20 +38,21 @@ type IssueKey struct { } type IssueFields struct { - Project IssueKey `json:"project"` - Summary string `json:"summary"` - Description string `json:"description"` - Teams []IssueValue `json:"customfield_13100"` - EngOwner IssueName `json:"customfield_16304"` - MyTeam IssueValue `json:"customfield_14803"` - SLA IssueValue `json:"customfield_15031"` - Segment IssueValue `json:"customfield_21110"` - Impact IssueValue `json:"customfield_21008"` - Urgency IssueValue `json:"customfield_21009"` - EscalationChannel IssueValue `json:"customfield_18514"` - StepsToReplication string `json:"customfield_17004"` - IssueType IssueName `json:"issuetype"` - Components []IssueName `json:"components"` + Project IssueKey `json:"project"` + Summary string `json:"summary"` + Description string `json:"description"` + Teams []IssueValue `json:"customfield_13100"` + EngOwner IssueName `json:"customfield_16304"` + MyTeam IssueValue `json:"customfield_14803"` + SLA IssueValue `json:"customfield_15031"` + Segment IssueValue `json:"customfield_21110"` + Impact IssueValue `json:"customfield_21008"` + Urgency IssueValue `json:"customfield_21009"` + EscalationChannel IssueValue `json:"customfield_18514"` + StepsToReplicate string `json:"customfield_17004"` + UserID string `json:"customfield_21112"` + IssueType IssueName `json:"issuetype"` + Components []IssueName `json:"components"` } type InternalIssue struct { @@ -222,20 +223,21 @@ func main() { service := serviceOwnership[serviceLabel] newIssue := InternalIssue{Fields: IssueFields{ - Project: IssueKey{Key: "CUSTESC"}, - Summary: *issue.Title, - Description: jirafyBodyMarkdown(issue), - Teams: []IssueValue{{Value: service.teamName}}, - EngOwner: IssueName{Name: service.owner}, - SLA: IssueValue{Value: "Pro / Free"}, - MyTeam: IssueValue{Value: "Other"}, - IssueType: IssueName{Name: "Bug"}, - Components: []IssueName{{Name: "SDK & Client API Libraries"}}, - Segment: IssueValue{Value: "None"}, - Impact: IssueValue{Value: "Low"}, - Urgency: IssueValue{Value: "Low"}, - EscalationChannel: IssueValue{Value: "Untriaged"}, - StepsToReplication: "n/a", + Project: IssueKey{Key: "CUSTESC"}, + Summary: *issue.Title, + Description: jirafyBodyMarkdown(issue), + Teams: []IssueValue{{Value: service.teamName}}, + EngOwner: IssueName{Name: service.owner}, + SLA: IssueValue{Value: "Pro / Free"}, + MyTeam: IssueValue{Value: "Other"}, + IssueType: IssueName{Name: "Bug"}, + Components: []IssueName{{Name: "SDK & Client API Libraries"}}, + Segment: IssueValue{Value: "PAYGO (Free, Pro, Business)"}, + Impact: IssueValue{Value: "Low"}, + Urgency: IssueValue{Value: "Low"}, + EscalationChannel: IssueValue{Value: "Untriaged"}, + StepsToReplicate: "n/a", + UserID: "0", }} res, err := json.Marshal(newIssue)