@@ -165,16 +165,18 @@ func (s service) Get(ctx context.Context, rs string, id uint64) (changes.Change,
return changes.Change{}, err
}
var q struct {
Repository struct {
PullRequest struct {
Number uint64
State githubql.PullRequestState
Title string
Author githubqlActor
CreatedAt githubql.DateTime
ViewerCanUpdate githubql.Boolean
Number uint64
State githubql.PullRequestState
Title string
Author githubqlActor
CreatedAt githubql.DateTime
Commits struct {
TotalCount int
}
} `graphql:"pullRequest(number:$prNumber)"`
} `graphql:"repository(owner:$repositoryOwner,name:$repositoryName)"`
}
variables := map[string]interface{}{
"repositoryOwner": githubql.String(repo.Owner),
@@ -200,10 +202,11 @@ func (s service) Get(ctx context.Context, rs string, id uint64) (changes.Change,
ID: pr.Number,
State: ghPRState(pr.State),
Title: pr.Title,
Author: ghActor(pr.Author),
CreatedAt: pr.CreatedAt.Time,
Commits: pr.Commits.TotalCount,
}, nil
}
func (s service) ListCommits(ctx context.Context, rs string, id uint64) ([]changes.Commit, error) {
repo, err := ghRepoSpec(rs)