Skip to content

Instantly share code, notes, and snippets.

@epk
Last active July 25, 2018 02:56
Show Gist options
  • Select an option

  • Save epk/276cd918efa09b332dea9e7fc256ca6d to your computer and use it in GitHub Desktop.

Select an option

Save epk/276cd918efa09b332dea9e7fc256ca6d to your computer and use it in GitHub Desktop.
type Payload struct {
ID string `json:"Id"`
Title string `json:"title"`
Type string `json:"type"`
Fields Fields `json:"fields"`
}
type Fields struct {
FixVersion []FixVersion `json:"fixVersions"`
}
type FixVersion struct {
Self string `json:"self"`
ID string `json:"id"`
Name string `json:"name"`
Archived bool `json:"archived"`
Released bool `json:"released"`
ProjectID int `json:"projectId"`
}
newPayload := &Payload{
ID: issue.ID,
Title: issue.Key,
Type: "object",
Fields: Fields{
[]FixVersion{
FixVersion{
Self: v.Self,
ID: v.ID,
Name: v.Name,
Archived: v.Archived,
Released: v.Released,
ProjectID: v.ProjectID,
},
},
},
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment