@@ -29,7 +29,7 @@ func issueUpdateTool(
2929 name , description , title string ,
3030 extraProps map [string ]* jsonschema.Schema ,
3131 extraRequired []string ,
32- buildRequest func (args map [string ]any ) (* github.IssueRequest , error ),
32+ buildRequest func (args map [string ]any ) (github.UpdateIssueRequest , error ),
3333) inventory.ServerTool {
3434 props := map [string ]* jsonschema.Schema {
3535 "owner" : {
@@ -92,7 +92,7 @@ func issueUpdateTool(
9292 return utils .NewToolResultErrorFromErr ("failed to get GitHub client" , err ), nil , nil
9393 }
9494
95- issue , resp , err := client .Issues .Edit (ctx , owner , repo , issueNumber , issueReq )
95+ issue , resp , err := client .Issues .Update (ctx , owner , repo , issueNumber , issueReq )
9696 if err != nil {
9797 return ghErrors .NewGitHubAPIErrorResponse (ctx , "failed to update issue" , resp , err ), nil , nil
9898 }
@@ -164,8 +164,8 @@ func GranularCreateIssue(t translations.TranslationHelperFunc) inventory.ServerT
164164 }
165165 body , _ := OptionalParam [string ](args , "body" )
166166
167- issueReq := & github.IssueRequest {
168- Title : & title ,
167+ issueReq := github.CreateIssueRequest {
168+ Title : title ,
169169 }
170170 if body != "" {
171171 issueReq .Body = & body
@@ -206,12 +206,12 @@ func GranularUpdateIssueTitle(t translations.TranslationHelperFunc) inventory.Se
206206 "title" : {Type : "string" , Description : "The new title for the issue" },
207207 },
208208 []string {"title" },
209- func (args map [string ]any ) (* github.IssueRequest , error ) {
209+ func (args map [string ]any ) (github.UpdateIssueRequest , error ) {
210210 title , err := RequiredParam [string ](args , "title" )
211211 if err != nil {
212- return nil , err
212+ return github. UpdateIssueRequest {} , err
213213 }
214- return & github.IssueRequest {Title : & title }, nil
214+ return github.UpdateIssueRequest {Title : & title }, nil
215215 },
216216 )
217217}
@@ -226,12 +226,12 @@ func GranularUpdateIssueBody(t translations.TranslationHelperFunc) inventory.Ser
226226 "body" : {Type : "string" , Description : "The new body content for the issue" },
227227 },
228228 []string {"body" },
229- func (args map [string ]any ) (* github.IssueRequest , error ) {
229+ func (args map [string ]any ) (github.UpdateIssueRequest , error ) {
230230 body , err := RequiredParam [string ](args , "body" )
231231 if err != nil {
232- return nil , err
232+ return github. UpdateIssueRequest {} , err
233233 }
234- return & github.IssueRequest {Body : & body }, nil
234+ return github.UpdateIssueRequest {Body : & body }, nil
235235 },
236236 )
237237}
@@ -392,7 +392,7 @@ func GranularUpdateIssueAssignees(t translations.TranslationHelperFunc) inventor
392392 for i , p := range payload {
393393 logins [i ] = p .(string )
394394 }
395- body = & github.IssueRequest {Assignees : & logins }
395+ body = & github.UpdateIssueRequest {Assignees : logins }
396396 }
397397
398398 apiURL := fmt .Sprintf ("repos/%s/%s/issues/%d" , owner , repo , issueNumber )
@@ -610,7 +610,7 @@ func GranularUpdateIssueLabels(t translations.TranslationHelperFunc) inventory.S
610610 for i , p := range payload {
611611 names [i ] = p .(string )
612612 }
613- body = & github.IssueRequest {Labels : & names }
613+ body = & github.UpdateIssueRequest {Labels : names }
614614 }
615615
616616 apiURL := fmt .Sprintf ("repos/%s/%s/issues/%d" , owner , repo , issueNumber )
@@ -654,12 +654,12 @@ func GranularUpdateIssueMilestone(t translations.TranslationHelperFunc) inventor
654654 },
655655 },
656656 []string {"milestone" },
657- func (args map [string ]any ) (* github.IssueRequest , error ) {
657+ func (args map [string ]any ) (github.UpdateIssueRequest , error ) {
658658 milestone , err := RequiredInt (args , "milestone" )
659659 if err != nil {
660- return nil , err
660+ return github. UpdateIssueRequest {} , err
661661 }
662- return & github.IssueRequest {Milestone : & milestone }, nil
662+ return github.UpdateIssueRequest {Milestone : & milestone }, nil
663663 },
664664 )
665665}
@@ -787,7 +787,7 @@ func GranularUpdateIssueType(t translations.TranslationHelperFunc) inventory.Ser
787787 },
788788 }
789789 } else {
790- body = & github.IssueRequest {Type : & issueType }
790+ body = & github.UpdateIssueRequest {Type : & issueType }
791791 }
792792
793793 apiURL := fmt .Sprintf ("repos/%s/%s/issues/%d" , owner , repo , issueNumber )
@@ -981,7 +981,7 @@ func GranularUpdateIssueState(t translations.TranslationHelperFunc) inventory.Se
981981 }
982982 body = req
983983 } else {
984- req := & github.IssueRequest {State : & state }
984+ req := & github.UpdateIssueRequest {State : & state }
985985 if stateReason != "" {
986986 req .StateReason = & stateReason
987987 }
0 commit comments