Skip to content

Commit

Permalink
add UserID field
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobbednarz authored Oct 6, 2023
1 parent 1c9dfe0 commit 0fc3477
Showing 1 changed file with 30 additions and 28 deletions.
58 changes: 30 additions & 28 deletions tools/cmd/sync-github-issue-to-jira/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 0fc3477

Please sign in to comment.