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