Skip to content

Commit

Permalink
Update manifest PR with small changes from @sbwsg.
Browse files Browse the repository at this point in the history
  • Loading branch information
wlynch committed Oct 11, 2019
1 parent 5599ed6 commit 50c2e14
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 6 deletions.
5 changes: 0 additions & 5 deletions cmd/pullrequest-init/disk.go
Original file line number Diff line number Diff line change
Expand Up @@ -175,28 +175,23 @@ func FromDisk(path string) (*PullRequest, map[string]Manifest, error) {
var err error
var manifest Manifest

// Start with comments
pr.Comments, manifest, err = commentsFromDisk(commentsPath)
if err != nil {
return nil, nil, err
}
manifests["comments"] = manifest

// Now Labels
pr.Labels, manifest, err = labelsFromDisk(labelsPath)
if err != nil {
return nil, nil, err
}
manifests["labels"] = manifest

// Now statuses
pr.Statuses, err = statusesFromDisk(statusesPath)
if err != nil {
return nil, nil, err
}

// Finally refs

pr.Base, err = refFromDisk(path, "base.json")
if err != nil {
return nil, nil, err
Expand Down
2 changes: 1 addition & 1 deletion cmd/pullrequest-init/disk_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ func TestToDisk(t *testing.T) {
}
}
if len(labelManifest) != len(gotManifest) {
t.Errorf("Label manifest does not match expected length. %d != %d, got %+v", len(labelManifest), len(gotManifest), gotManifest)
t.Errorf("Label manifest does not match expected length. expected %d, got %d: %+v", len(labelManifest), len(gotManifest), gotManifest)
}

// Check the comments
Expand Down
1 change: 1 addition & 0 deletions cmd/pullrequest-init/fake_github.go
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,7 @@ func (g *FakeGitHub) listLabels(w http.ResponseWriter, r *http.Request) {
key, err := prKey(r)
if err != nil {
http.Error(w, err.Error(), http.StatusBadRequest)
return
}

pr, ok := g.pr[key]
Expand Down

0 comments on commit 50c2e14

Please sign in to comment.