MCPcopy
hub / github.com/mislav/hub / CreateIssue

Method CreateIssue

github/client.go:757–771  ·  view source on GitHub ↗
(project *Project, params interface{})

Source from the content-addressed store, hash-verified

755}
756
757func (client *Client) CreateIssue(project *Project, params interface{}) (issue *Issue, err error) {
758 api, err := client.simpleApi()
759 if err != nil {
760 return
761 }
762
763 res, err := api.PostJSON(fmt.Sprintf("repos/%s/%s/issues", project.Owner, project.Name), params)
764 if err = checkStatus(201, "creating issue", res, err); err != nil {
765 return
766 }
767
768 issue = &Issue{}
769 err = res.Unmarshal(issue)
770 return
771}
772
773func (client *Client) UpdateIssue(project *Project, issueNumber int, params map[string]interface{}) (err error) {
774 api, err := client.simpleApi()

Callers 2

createIssueFunction · 0.95
reportFunction · 0.95

Calls 4

simpleApiMethod · 0.95
checkStatusFunction · 0.85
PostJSONMethod · 0.80
UnmarshalMethod · 0.80

Tested by

no test coverage detected