diff options
author | Michael Muré <batolettre@gmail.com> | 2019-07-23 19:50:58 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-07-23 19:50:58 +0200 |
commit | 9ecbcb1cf6348b95b31ccef3f9722be078dbe223 (patch) | |
tree | d855b993905051d5ff5dbc3e30460bc09fa2e2c4 /bug | |
parent | ca00c9c6b84f0b1333e40666ab979d0d8fdc4036 (diff) | |
parent | 29fdd37ce69b48aa9fc3c1b829ff67818041068f (diff) | |
download | git-bug-9ecbcb1cf6348b95b31ccef3f9722be078dbe223.tar.gz |
Merge pull request #179 from MichaelMure/gitlab-support
Add gitlab bridge configuration and importer
Diffstat (limited to 'bug')
-rw-r--r-- | bug/snapshot.go | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/bug/snapshot.go b/bug/snapshot.go index 114b1123..f1da8099 100644 --- a/bug/snapshot.go +++ b/bug/snapshot.go @@ -70,6 +70,17 @@ func (snap *Snapshot) SearchTimelineItem(hash git.Hash) (TimelineItem, error) { return nil, fmt.Errorf("timeline item not found") } +// SearchComment will search for a comment matching the given hash +func (snap *Snapshot) SearchComment(hash git.Hash) (*Comment, error) { + for _, c := range snap.Comments { + if c.id == hash.String() { + return &c, nil + } + } + + return nil, fmt.Errorf("comment item not found") +} + // append the operation author to the actors list func (snap *Snapshot) addActor(actor identity.Interface) { for _, a := range snap.Actors { |