@@ -268,18 +268,18 @@ func (c *Client) GetIssue(ctx context.Context, owner, repo, number string) (*Iss
268268}
269269
270270func (c * Client ) CreateIssue (ctx context.Context , owner , repo , title , body string ) (* Issue , error ) {
271- payload := map [string ]any {"title" : title , "body" : body }
271+ payload := map [string ]any {"repo" : repo , " title" : title , "body" : body }
272272 var issue Issue
273- if err := c .Request (ctx , http .MethodPost , fmt .Sprintf ("repos/%s/%s/ issues" , owner , repo ), nil , payload , & issue ); err != nil {
273+ if err := c .Request (ctx , http .MethodPost , fmt .Sprintf ("repos/%s/issues" , owner ), nil , payload , & issue ); err != nil {
274274 return nil , err
275275 }
276276 return & issue , nil
277277}
278278
279279func (c * Client ) UpdateIssueState (ctx context.Context , owner , repo , number , state string ) (* Issue , error ) {
280- payload := map [string ]any {"state" : state }
280+ payload := map [string ]any {"repo" : repo , " state" : state }
281281 var issue Issue
282- if err := c .Request (ctx , http .MethodPatch , fmt .Sprintf ("repos/%s/%s/ issues/%s" , owner , repo , number ), nil , payload , & issue ); err != nil {
282+ if err := c .Request (ctx , http .MethodPatch , fmt .Sprintf ("repos/%s/issues/%s" , owner , number ), nil , payload , & issue ); err != nil {
283283 return nil , err
284284 }
285285 return & issue , nil
0 commit comments