dmitri.shuralyov.com/service/change

Start the commits tab.
dmitshur committed 6 years ago commit 430fd9614fdd04855b06fbb9c62785418f417bb5
Showing partial commit. Full Commit
Collapse all
changes.go
@@ -16,10 +16,12 @@ type Service interface {
	// Count changes.
	Count(ctx context.Context, repo string, opt ListOptions) (uint64, error)

	// Get a change.
	Get(ctx context.Context, repo string, id uint64) (Change, error)
	// ListCommits lists change commits.
	ListCommits(ctx context.Context, repo string, id uint64) ([]Commit, error)
	// Get a change diff.
	GetDiff(ctx context.Context, repo string, id uint64) ([]byte, error)

	// ListComments lists comments for specified change id.
	ListComments(ctx context.Context, repo string, id uint64, opt *ListCommentsOptions) ([]issues.Comment, error)
@@ -36,10 +38,17 @@ type Change struct {
	Author    users.User
	CreatedAt time.Time
	Replies   int // Number of replies to this change (not counting the mandatory change description comment).
}

type Commit struct {
	SHA        string
	Message    string
	Author     users.User
	AuthorTime time.Time
}

// State represents the change state.
type State string

const (
	// OpenState is when a change is open.