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
1 changed files with 5 additions and 0 deletions

View File

@ -138,6 +138,11 @@ func (a *App) GithubSync() error {
for i, ticket := range tickets {
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)
if err != nil {
return err