MCPcopy Create free account
hub / github.com/RealDevSquad/website-backend / fetchOpenPRs

Function fetchOpenPRs

services/githubService.js:135–157  ·  view source on GitHub ↗
(params = {})

Source from the content-addressed store, hash-verified

133 *
134 */
135const fetchOpenPRs = async (params = {}) => {
136 const { perPage = 100, page = 1, searchParams = {}, resultOptions = {} } = params;
137
138 try {
139 const url = getGithubURL(
140 {
141 type: "pr",
142 is: "open",
143 ...searchParams,
144 },
145 {
146 sort: "created",
147 ...resultOptions,
148 per_page: perPage,
149 page,
150 }
151 );
152 return getFetch(url);
153 } catch (err) {
154 logger.error(`Error while fetching open pull requests: ${err}`);
155 throw err;
156 }
157};
158
159const fetchMergedPRs = async (params = {}) => {
160 const { perPage = 100, page = 1, searchParams = {}, resultOptions = {} } = params;

Callers

nothing calls this directly

Calls 2

getGithubURLFunction · 0.85
getFetchFunction · 0.85

Tested by

no test coverage detected