MCPcopy Index your code
hub / github.com/google/go-github / Add

Method Add

github/sub_issue.go:103–117  ·  view source on GitHub ↗

Add adds a sub-issue to the specified issue. The sub-issue to be added must belong to the same repository owner as the parent issue. To replace the existing parent of a sub-issue, set replaceParent to true. GitHub API docs: https://docs.github.com/rest/issues/sub-issues?apiVersion=2022-11-28#add-s

(ctx context.Context, owner, repo string, issueNumber int64, subIssue SubIssueRequest)

Source from the content-addressed store, hash-verified

101//
102//meta:operation POST /repos/{owner}/{repo}/issues/{issue_number}/sub_issues
103func (s *SubIssueService) Add(ctx context.Context, owner, repo string, issueNumber int64, subIssue SubIssueRequest) (*SubIssue, *Response, error) {
104 u := fmt.Sprintf("repos/%v/%v/issues/%v/sub_issues", owner, repo, issueNumber)
105 req, err := s.client.NewRequest(ctx, "POST", u, subIssue)
106 if err != nil {
107 return nil, nil, err
108 }
109
110 var si *SubIssue
111 resp, err := s.client.Do(req, &si)
112 if err != nil {
113 return nil, resp, err
114 }
115
116 return si, resp, nil
117}
118
119// Reprioritize changes a sub-issue's priority to a different position in the parent list.
120//

Callers 15

TestRateLimitsFunction · 0.80
parseFormsFunction · 0.80
TestRateLimits_overQuotaFunction · 0.80
createWebSubRequestMethod · 0.80
bareDoMethod · 0.80
testFormValuesFunction · 0.80
TestClient_CloneFunction · 0.80
TestNewFormRequestFunction · 0.80

Calls 2

NewRequestMethod · 0.80
DoMethod · 0.45