diff options
author | Michael Muré <batolettre@gmail.com> | 2021-04-09 13:07:45 +0200 |
---|---|---|
committer | Michael Muré <batolettre@gmail.com> | 2021-04-09 13:07:45 +0200 |
commit | 10a80f188861157b5f58bb700fe7f1c84bb4da95 (patch) | |
tree | b6c977c4687d556b42a5b62643c6b2d113c789af /bridge/github/import.go | |
parent | 1520f678f7a2bc6e01d9b01df5ce49f2f46be7d7 (diff) | |
download | git-bug-10a80f188861157b5f58bb700fe7f1c84bb4da95.tar.gz |
github: minor cleanups
Diffstat (limited to 'bridge/github/import.go')
-rw-r--r-- | bridge/github/import.go | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/bridge/github/import.go b/bridge/github/import.go index 47be6374..306ef087 100644 --- a/bridge/github/import.go +++ b/bridge/github/import.go @@ -15,7 +15,7 @@ import ( "github.com/MichaelMure/git-bug/util/text" ) -const EMPTY_TITLE_PLACEHOLDER = "<empty string>" +const EmptyTitlePlaceholder = "<empty string>" // githubImporter implement the Importer interface type githubImporter struct { @@ -196,7 +196,7 @@ func (gi *githubImporter) ensureIssue(ctx context.Context, repo *cache.RepoCache // return an error: empty title. title := string(issue.Title) if title == " \u200b" { // U+200B == zero width space - title = EMPTY_TITLE_PLACEHOLDER + title = EmptyTitlePlaceholder } var textInput string @@ -380,7 +380,7 @@ func (gi *githubImporter) ensureTimelineItem(ctx context.Context, repo *cache.Re // function to return an error: empty title. title := string(item.RenamedTitleEvent.CurrentTitle) if title == " \u200b" { // U+200B == zero width space - title = EMPTY_TITLE_PLACEHOLDER + title = EmptyTitlePlaceholder } op, err := b.SetTitleRaw( @@ -568,6 +568,9 @@ func (gi *githubImporter) getGhost(ctx context.Context, repo *cache.RepoCache) ( return nil, err } user, err := gi.mediator.User(ctx, loginName) + if err != nil { + return nil, err + } userName := "" if user.Name != nil { userName = string(*user.Name) |