Skip to content

Commit

Permalink
Bug fix and TODO
Browse files Browse the repository at this point in the history
  • Loading branch information
bradleyfalzon committed Apr 5, 2017
1 parent 70eba0b commit 7673d8f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions internal/web/web.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,15 @@ func (web *Web) AnalysisHandler(w http.ResponseWriter, r *http.Request) {
return
}

// TODO there may be a scenario where a diff isn't return (after a forced
// push?), if so, we should just give the template the issues to render.
// If no errors, give template nil issues.

diffReader, err := vcs.Diff(r.Context(), analysis.RepositoryID, analysis.CommitFrom, analysis.CommitTo, analysis.RequestNumber)
if err != nil {
log.Printf("error getting diff from VCS for analysisID %v: %v", analysisID, err)
web.errorHandler(w, r, http.StatusInternalServerError, "Could not get VCS")
return
}
defer diffReader.Close()

Expand Down

0 comments on commit 7673d8f

Please sign in to comment.