@@ -127,3 +127,21 @@ func (c *Client) MigrateRepo(opt MigrateRepoOption) (*Repository, error) {
127
127
repo := new (Repository )
128
128
return repo , c .getParsedResponse ("POST" , "/repos/migrate" , jsonHeader , bytes .NewReader (body ), repo )
129
129
}
130
+
131
+ type EditIssueTrackerOption struct {
132
+ EnableIssues * bool `json:"enable_issues"`
133
+ EnableExternalTracker * bool `json:"enable_external_tracker"`
134
+ ExternalTrackerURL * string `json:"external_tracker_url"`
135
+ TrackerURLFormat * string `json:"tracker_url_format"`
136
+ TrackerIssueStyle * string `json:"tracker_issue_style"`
137
+ }
138
+
139
+ // EditIssueTracker updates issue tracker options of the repository.
140
+ func (c * Client ) EditIssueTracker (owner , repo string , opt EditIssueTrackerOption ) error {
141
+ body , err := json .Marshal (& opt )
142
+ if err != nil {
143
+ return err
144
+ }
145
+ _ , err = c .getResponse ("PATCH" , fmt .Sprintf ("/repos/%s/%s/issue-tracker" , owner , repo ), jsonHeader , bytes .NewReader (body ))
146
+ return err
147
+ }
0 commit comments