Add initial version of the sync command

This commit is contained in:
Miguel de la Cruz 2020-09-21 09:27:50 +02:00
parent f0d4dfb962
commit a13a0ec949
3 changed files with 42 additions and 11 deletions

View file

@ -105,6 +105,16 @@ func (c *Campaign) RemoveDuplicateTickets(fileOnly bool) {
c.Tickets = cleanTickets
}
func (c *Campaign) GetPublishedGithubTickets() []*Ticket {
publishedTickets := []*Ticket{}
for _, ticket := range c.Tickets {
if ticket.IsPublishedGithub() {
publishedTickets = append(publishedTickets, ticket)
}
}
return publishedTickets
}
func (c *Campaign) FillTicket(t *Ticket) error {
summaryTmpl, err := template.New("").Parse(c.Summary)
if err != nil {