Do not sync tickets that are already on their final stage

This commit is contained in:
Miguel de la Cruz 2020-10-16 09:11:01 +02:00
parent d87804b74a
commit 3aab0149b3

View file

@ -138,6 +138,11 @@ func (a *App) GithubSync() error {
for i, ticket := range tickets { for i, ticket := range tickets {
fmt.Printf("\rUpdating ticket %d of %d", i+1, total) fmt.Printf("\rUpdating ticket %d of %d", i+1, total)
// ticket is on its final stage, continue
if ticket.IsAssigned() && ticket.IsClosed() {
continue
}
issue, _, err := a.GithubClient.Issues.Get(context.Background(), owner, repo, ticket.GithubLink) issue, _, err := a.GithubClient.Issues.Get(context.Background(), owner, repo, ticket.GithubLink)
if err != nil { if err != nil {
return err return err