Parse parses a review comment from a git note.
(note repository.Note)
| 136 | |
| 137 | // Parse parses a review comment from a git note. |
| 138 | func Parse(note repository.Note) (Comment, error) { |
| 139 | bytes := []byte(note) |
| 140 | var comment Comment |
| 141 | err := json.Unmarshal(bytes, &comment) |
| 142 | return comment, err |
| 143 | } |
| 144 | |
| 145 | // ParseAllValid takes collection of git notes and tries to parse a review |
| 146 | // comment from each one. Any notes that are not valid review comments get |