MCPcopy Create free account
hub / github.com/cli/cli / issueResponseAllIssues2Fields

Function issueResponseAllIssues2Fields

pkg/cmd/issue/view/view_test.go:660–697  ·  view source on GitHub ↗

issueResponseAllIssues2Fields returns a GraphQL response for an issue with all Issues 2.0 fields populated.

()

Source from the content-addressed store, hash-verified

658
659// issueResponseAllIssues2Fields returns a GraphQL response for an issue with all Issues 2.0 fields populated.
660func issueResponseAllIssues2Fields() string {
661 return `{ "data": { "repository": { "hasIssuesEnabled": true, "issue": {
662 "id": "ISSUE_123",
663 "number": 123,
664 "title": "Implement OAuth flow",
665 "state": "OPEN",
666 "stateReason": "",
667 "body": "The OAuth flow needs work.",
668 "author": {"login": "user1"},
669 "createdAt": "2024-01-01T00:00:00Z",
670 "comments": {"nodes":[], "totalCount": 0},
671 "assignees": {"nodes": [], "totalCount": 0},
672 "labels": {"nodes": [], "totalCount": 0},
673 "milestone": null,
674 "reactionGroups": [],
675 "projectCards": {"nodes": [], "totalCount": 0},
676 "projectItems": {"nodes": [], "totalCount": 0},
677 "url": "https://github.com/OWNER/REPO/issues/123",
678 "issueType": {"id":"IT_1","name":"Bug","description":"Something is not working","color":"d73a4a"},
679 "parent": {"number":100,"title":"Epic: Authentication overhaul","url":"https://github.com/OWNER/REPO/issues/100","state":"OPEN","repository":{"nameWithOwner":"OWNER/REPO"}},
680 "subIssues": {
681 "nodes": [
682 {"number":101,"title":"Design auth module","url":"https://github.com/OWNER/REPO/issues/101","state":"CLOSED","repository":{"nameWithOwner":"OWNER/REPO"}},
683 {"number":102,"title":"Token refresh logic","url":"https://github.com/OWNER/REPO/issues/102","state":"OPEN","repository":{"nameWithOwner":"OWNER/REPO"}}
684 ],
685 "totalCount": 2
686 },
687 "subIssuesSummary": {"total":2,"completed":1,"percentCompleted":50.0},
688 "blockedBy": {
689 "nodes": [{"number":200,"title":"API rate limiting","url":"https://github.com/OWNER/REPO/issues/200","state":"OPEN","repository":{"nameWithOwner":"OWNER/REPO"}}],
690 "totalCount": 1
691 },
692 "blocking": {
693 "nodes": [{"number":300,"title":"Release v2.0","url":"https://github.com/OWNER/REPO/issues/300","state":"OPEN","repository":{"nameWithOwner":"OWNER/REPO"}}],
694 "totalCount": 1
695 }
696 } } } }`
697}
698
699// issueResponseNoIssues2Fields returns a GraphQL response for an issue with no Issues 2.0 fields.
700func issueResponseNoIssues2Fields() string {

Calls

no outgoing calls

Tested by

no test coverage detected