MCPcopy Index your code
hub / github.com/github/github-mcp-server / getLatestPendingReviewQuery

Function getLatestPendingReviewQuery

pkg/github/pullrequests_test.go:3877–3916  ·  view source on GitHub ↗
(p getLatestPendingReviewQueryParams)

Source from the content-addressed store, hash-verified

3875}
3876
3877func getLatestPendingReviewQuery(p getLatestPendingReviewQueryParams) githubv4mock.Matcher {
3878 return githubv4mock.NewQueryMatcher(
3879 struct {
3880 Repository struct {
3881 PullRequest struct {
3882 Reviews struct {
3883 Nodes []struct {
3884 ID githubv4.ID
3885 State githubv4.PullRequestReviewState
3886 URL githubv4.URI
3887 }
3888 } `graphql:"reviews(first: 1, author: $author)"`
3889 } `graphql:"pullRequest(number: $prNum)"`
3890 } `graphql:"repository(owner: $owner, name: $name)"`
3891 }{},
3892 map[string]any{
3893 "author": githubv4.String(p.author),
3894 "owner": githubv4.String(p.owner),
3895 "name": githubv4.String(p.repo),
3896 "prNum": githubv4.Int(p.prNum),
3897 },
3898 githubv4mock.DataResponse(
3899 map[string]any{
3900 "repository": map[string]any{
3901 "pullRequest": map[string]any{
3902 "reviews": map[string]any{
3903 "nodes": []any{
3904 map[string]any{
3905 "id": p.reviews[0].id,
3906 "state": p.reviews[0].state,
3907 "url": p.reviews[0].url,
3908 },
3909 },
3910 },
3911 },
3912 },
3913 },
3914 ),
3915 )
3916}
3917
3918func TestAddReplyToPullRequestComment(t *testing.T) {
3919 t.Parallel()

Calls 3

NewQueryMatcherFunction · 0.92
DataResponseFunction · 0.92
StringMethod · 0.45

Tested by

no test coverage detected