dmitri.shuralyov.com/service/change/...

maintner: Fix build.

Update to current changes.Service interface.
dmitshur committed 6 years ago commit 975d37e1ba390ac430522d0ba6efe7812f410239
Collapse all
maintner/maintner.go
@@ -8,11 +8,10 @@ import (
	"log"
	"sort"
	"strings"

	"dmitri.shuralyov.com/changes"
	"github.com/shurcooL/issues"
	"github.com/shurcooL/users"
	"golang.org/x/build/maintner"
)

// NewService creates an changes.Service backed with the given corpus.
@@ -124,18 +123,13 @@ func state(status string) changes.State {
	default:
		panic(fmt.Errorf("unrecognized status %q", status))
	}
}

func (s service) ListComments(ctx context.Context, _ string, id uint64, opt *changes.ListCommentsOptions) ([]issues.Comment, error) {
func (s service) ListTimeline(ctx context.Context, _ string, id uint64, opt *changes.ListTimelineOptions) ([]interface{}, error) {
	// TODO.
	return nil, fmt.Errorf("ListComments: not implemented")
}

func (s service) ListEvents(ctx context.Context, _ string, id uint64, opt *changes.ListCommentsOptions) ([]issues.Event, error) {
	// TODO.
	return nil, fmt.Errorf("ListEvents: not implemented")
	return nil, fmt.Errorf("ListTimeline: not implemented")
}

func gerritUser(user *maintner.GitPerson) users.User {
	return users.User{
		UserSpec: users.UserSpec{