diff options
author | Amine Hilaly <hilalyamine@gmail.com> | 2019-05-04 13:19:56 +0200 |
---|---|---|
committer | Amine Hilaly <hilalyamine@gmail.com> | 2019-05-05 18:16:10 +0200 |
commit | f7ea3421caa2c8957a82454255c4fdd699b70a9c (patch) | |
tree | 299faef7b4588dd5f39b0908ee3c5668655926a6 /bridge/github/import.go | |
parent | 0d976f66e87b7c053b10d50fe0849f6c8e5412e6 (diff) | |
download | git-bug-f7ea3421caa2c8957a82454255c4fdd699b70a9c.tar.gz |
Add ForceLabelChange functionalities
Diffstat (limited to 'bridge/github/import.go')
-rw-r--r-- | bridge/github/import.go | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/bridge/github/import.go b/bridge/github/import.go index 4960117a..5f99b5ea 100644 --- a/bridge/github/import.go +++ b/bridge/github/import.go @@ -40,7 +40,7 @@ func (gi *githubImporter) ImportAll(repo *cache.RepoCache, since time.Time) erro for gi.iterator.NextIssue() { issue := gi.iterator.IssueValue() - fmt.Printf("importing issue: %v\n", gi.iterator.count) + fmt.Printf("importing issue: %v %v\n", gi.iterator.count, issue.Title) // get issue edits issueEdits := []userContentEdit{} for gi.iterator.NextIssueEdit() { @@ -71,12 +71,12 @@ func (gi *githubImporter) ImportAll(repo *cache.RepoCache, since time.Time) erro err := gi.ensureTimelineComment(repo, b, item.IssueComment, commentEdits) if err != nil { - return fmt.Errorf("timeline event creation: %v", err) + return fmt.Errorf("timeline comment creation: %v", err) } } else { if err := gi.ensureTimelineItem(repo, b, item); err != nil { - return fmt.Errorf("timeline comment creation: %v", err) + return fmt.Errorf("timeline event creation: %v", err) } } } @@ -189,7 +189,7 @@ func (gi *githubImporter) ensureTimelineItem(repo *cache.RepoCache, b *cache.Bug if err != nil { return err } - _, _, err = b.ChangeLabelsRaw( + _, err = b.ForceChangeLabelsRaw( author, item.LabeledEvent.CreatedAt.Unix(), []string{ @@ -198,6 +198,7 @@ func (gi *githubImporter) ensureTimelineItem(repo *cache.RepoCache, b *cache.Bug nil, map[string]string{keyGithubId: id}, ) + return err case "UnlabeledEvent": @@ -211,7 +212,7 @@ func (gi *githubImporter) ensureTimelineItem(repo *cache.RepoCache, b *cache.Bug return err } - _, _, err = b.ChangeLabelsRaw( + _, err = b.ForceChangeLabelsRaw( author, item.UnlabeledEvent.CreatedAt.Unix(), nil, |