@@ -154,3 +154,100 @@ func (s *svc) ListCheckRunsForRef(ctx context.Context, ref *github.RemoteRef, op
154154func NewAsService (* any.Any , * zap.Logger , tally.Scope ) (service.Service , error ) {
155155 return New (), nil
156156}
157+
158+ func (s * svc ) SearchIssues (ctx context.Context , query string , opts * githubv3.SearchOptions ) (* githubv3.IssuesSearchResult , error ) {
159+ var issuesResults []* githubv3.Issue
160+
161+ issuesResults = append (issuesResults , & githubv3.Issue {
162+ URL : githubv3 .String ("https://api.github.com/repos/batterseapower/pinyin-toolkit/issues/132" ),
163+ RepositoryURL : githubv3 .String ("https://api.github.com/repos/batterseapower/pinyin-toolkit" ),
164+ LabelsURL : githubv3 .String ("https://api.github.com/repos/batterseapower/pinyin-toolkit/issues/132/labels{/name}" ),
165+ CommentsURL : githubv3 .String ("https://api.github.com/repos/batterseapower/pinyin-toolkit/issues/132/comments" ),
166+ EventsURL : githubv3 .String ("https://api.github.com/repos/batterseapower/pinyin-toolkit/issues/132/events" ),
167+ HTMLURL : githubv3 .String ("https://github.com/batterseapower/pinyin-toolkit/issues/132" ),
168+ ID : githubv3 .Int64 (35802 ),
169+ NodeID : githubv3 .String ("MDU6SXNzdWUzNTgwMg==" ),
170+ Number : githubv3 .Int (132 ),
171+ Title : githubv3 .String ("Line Number Indexes Beyond 20 Not Displayed" ),
172+ User : & githubv3.User {
173+ Login : githubv3 .String ("Nick3C" ),
174+ ID : githubv3 .Int64 (90254 ),
175+ NodeID : githubv3 .String ("MDQ6VXNlcjkwMjU0" ),
176+ AvatarURL : githubv3 .String ("https://secure.gravatar.com/avatar/934442aadfe3b2f4630510de416c5718?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-user-420.png" ),
177+ GravatarID : githubv3 .String ("" ),
178+ URL : githubv3 .String ("https://api.github.com/users/Nick3C" ),
179+ HTMLURL : githubv3 .String ("https://github.com/Nick3C" ),
180+ FollowersURL : githubv3 .String ("https://api.github.com/users/Nick3C/followers" ),
181+ FollowingURL : githubv3 .String ("https://api.github.com/users/Nick3C/following{/other_user}" ),
182+ GistsURL : githubv3 .String ("https://api.github.com/users/Nick3C/gists{/gist_id}" ),
183+ StarredURL : githubv3 .String ("https://api.github.com/users/Nick3C/starred{/owner}{/repo}" ),
184+ SubscriptionsURL : githubv3 .String ("https://api.github.com/users/Nick3C/subscriptions" ),
185+ OrganizationsURL : githubv3 .String ("https://api.github.com/users/Nick3C/orgs" ),
186+ ReposURL : githubv3 .String ("https://api.github.com/users/Nick3C/repos" ),
187+ EventsURL : githubv3 .String ("https://api.github.com/users/Nick3C/events{/privacy}" ),
188+ ReceivedEventsURL : githubv3 .String ("https://api.github.com/users/Nick3C/received_events" ),
189+ Type : githubv3 .String ("User" ),
190+ SiteAdmin : githubv3 .Bool (true ),
191+ },
192+ Labels : nil ,
193+ State : githubv3 .String ("open" ),
194+ Assignee : nil ,
195+ Milestone : & githubv3.Milestone {
196+ URL : githubv3 .String ("https://api.github.com/repos/octocat/Hello-World/milestones/1" ),
197+ HTMLURL : githubv3 .String ("https://github.com/octocat/Hello-World/milestones/v1.0" ),
198+ LabelsURL : githubv3 .String ("https://api.github.com/repos/octocat/Hello-World/milestones/1/labels" ),
199+ ID : githubv3 .Int64 (1002604 ),
200+ NodeID : githubv3 .String ("MDk6TWlsZXN0b25lMTAwMjYwNA==" ),
201+ Number : githubv3 .Int (1 ),
202+ State : githubv3 .String ("open" ),
203+ Title : githubv3 .String ("v1.0" ),
204+ Description : githubv3 .String ("Tracking milestone for version 1.0" ),
205+ Creator : & githubv3.User {
206+ Login : githubv3 .String ("octocat" ),
207+ ID : githubv3 .Int64 (1 ),
208+ NodeID : githubv3 .String ("MDQ6VXNlcjE=" ),
209+ AvatarURL : githubv3 .String ("https://github.com/images/error/octocat_happy.gif" ),
210+ GravatarID : githubv3 .String ("" ),
211+ URL : githubv3 .String ("https://api.github.com/users/octocat" ),
212+ HTMLURL : githubv3 .String ("https://github.com/octocat" ),
213+ FollowersURL : githubv3 .String ("https://api.github.com/users/octocat/followers" ),
214+ FollowingURL : githubv3 .String ("https://api.github.com/users/octocat/following{/other_user}" ),
215+ GistsURL : githubv3 .String ("https://api.github.com/users/octocat/gists{/gist_id}" ),
216+ StarredURL : githubv3 .String ("https://api.github.com/users/octocat/starred{/owner}{/repo}" ),
217+ SubscriptionsURL : githubv3 .String ("https://api.github.com/users/octocat/subscriptions" ),
218+ OrganizationsURL : githubv3 .String ("https://api.github.com/users/octocat/orgs" ),
219+ ReposURL : githubv3 .String ("https://api.github.com/users/octocat/repos" ),
220+ EventsURL : githubv3 .String ("https://api.github.com/users/octocat/events{/privacy}" ),
221+ ReceivedEventsURL : githubv3 .String ("https://api.github.com/users/octocat/received_events" ),
222+ Type : githubv3 .String ("User" ),
223+ SiteAdmin : githubv3 .Bool (false ),
224+ },
225+ OpenIssues : githubv3 .Int (4 ),
226+ ClosedIssues : githubv3 .Int (8 ),
227+ CreatedAt : nil ,
228+ UpdatedAt : nil ,
229+ ClosedAt : nil ,
230+ DueOn : nil ,
231+ },
232+ Comments : githubv3 .Int (15 ),
233+ CreatedAt : nil ,
234+ UpdatedAt : nil ,
235+ ClosedAt : nil ,
236+ PullRequestLinks : & githubv3.PullRequestLinks {
237+ URL : githubv3 .String ("https://api/github.com/repos/octocat/Hello-World/pull/1347" ),
238+ HTMLURL : githubv3 .String ("https://github.com/octocat/Hello-World/pull/1347" ),
239+ DiffURL : githubv3 .String ("https://github.com/octocat/Hello-World/pull/1347.diff" ),
240+ PatchURL : githubv3 .String ("https://api.github.com/repos/octocat/Hello-World/pulls/1347" ),
241+ },
242+ Body : githubv3 .String ("..." ),
243+ Locked : githubv3 .Bool (true ),
244+ AuthorAssociation : githubv3 .String ("COLLABORATOR" ),
245+ StateReason : githubv3 .String ("completed" ),
246+ })
247+
248+ return & githubv3.IssuesSearchResult {
249+ Total : githubv3 .Int (280 ),
250+ IncompleteResults : githubv3 .Bool (false ),
251+ Issues : issuesResults ,
252+ }, nil
253+ }
0 commit comments