diff options
author | Michael Muré <batolettre@gmail.com> | 2020-01-04 13:10:53 +0100 |
---|---|---|
committer | Michael Muré <batolettre@gmail.com> | 2020-01-04 13:11:29 +0100 |
commit | ee48aef489c91a99b665ab1cd783e241611a3841 (patch) | |
tree | eb8f9567bcb621f45777f2b6de675956766285c9 | |
parent | a785bcdad6296b3babeb62ef3e91d66450730244 (diff) | |
download | git-bug-ee48aef489c91a99b665ab1cd783e241611a3841.tar.gz |
github: warning when the comment to be edited is missing instead of failing
fix #286
-rw-r--r-- | bridge/github/import.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/bridge/github/import.go b/bridge/github/import.go index dfc851fd..39aebccb 100644 --- a/bridge/github/import.go +++ b/bridge/github/import.go @@ -201,6 +201,11 @@ func (gi *githubImporter) ensureIssue(repo *cache.RepoCache, issue issueTimeline // other edits will be added as CommentEdit operations target, err := b.ResolveOperationWithMetadata(metaKeyGithubId, parseId(issue.Id)) + if err == cache.ErrNoMatchingOp { + // original comment is missing somehow, issuing a warning + gi.out <- core.NewImportWarning(fmt.Errorf("comment ID %s to edit is missing", parseId(issue.Id)), b.Id()) + continue + } if err != nil { return nil, err } |