MCPcopy Index your code
hub / github.com/github/docs / searchCode

Function searchCode

script/helpers/git-utils.js:164–177  ·  view source on GitHub ↗
(q, perPage, currentPage)

Source from the content-addressed store, hash-verified

162}
163
164async function searchCode(q, perPage, currentPage) {
165 try {
166 const { data } = await secondaryRateLimitRetry(github.rest.search.code, {
167 q,
168 per_page: perPage,
169 page: currentPage,
170 })
171
172 return data
173 } catch (err) {
174 console.log(`error searching for ${q} in code`)
175 throw err
176 }
177}
178
179async function secondaryRateLimitRetry(callable, args, maxAttempts = 10, sleepTime = 1000) {
180 try {

Callers 1

Calls 1

secondaryRateLimitRetryFunction · 0.85

Tested by

no test coverage detected