Add publish batch command

This commit is contained in:
Miguel de la Cruz 2020-03-05 22:42:49 +01:00
parent 2123820586
commit e5ed57c3d8

View file

@ -143,5 +143,14 @@ func (c *JiraClient) PublishAll(cmp *model.Campaign) (int, error) {
} }
func (c *JiraClient) PublishBatch(cmp *model.Campaign, batch int) error { func (c *JiraClient) PublishBatch(cmp *model.Campaign, batch int) error {
for i := 0; i <= batch; i++ {
next, err := c.PublishNextTicket(cmp)
if err != nil {
return err
}
if !next {
return nil
}
}
return nil return nil
} }