MCPcopy Index your code
hub / github.com/gitify-app/gitify / fetchPullByNumber

Function fetchPullByNumber

src/renderer/utils/api/client.ts:262–285  ·  view source on GitHub ↗
(
  notification: GitifyNotification,
)

Source from the content-addressed store, hash-verified

260 * Fetch GitHub Pull Request by PR Number.
261 */
262export async function fetchPullByNumber(
263 notification: GitifyNotification,
264): Promise<FetchPullRequestByNumberQuery> {
265 const number = getNumberFromUrl(notification.subject.url!);
266
267 return performGraphQLRequest(
268 notification.account,
269 FetchPullRequestByNumberDocument,
270 {
271 owner: notification.repository.owner.login,
272 name: notification.repository.name,
273 number: number,
274 firstClosingIssues: Constants.GRAPHQL_ARGS.FIRST_CLOSING_ISSUES,
275 firstLabels: Constants.GRAPHQL_ARGS.FIRST_LABELS,
276 lastComments: Constants.GRAPHQL_ARGS.LAST_COMMENTS,
277 lastReviews: Constants.GRAPHQL_ARGS.LAST_REVIEWS,
278 },
279 );
280} /**
281 * Fetch notification details for supported types (ie: Discussions, Issues and Pull Requests).
282
283 * This significantly reduces the amount of API calls by performing a building a merged GraphQL query,
284 * making the most efficient use of the available GitHub API quota limits.
285 */
286export async function fetchNotificationDetailsForList(
287 notifications: GitifyNotification[],
288): Promise<

Callers 2

enrichMethod · 0.90
client.test.tsFile · 0.90

Calls 2

getNumberFromUrlFunction · 0.90
performGraphQLRequestFunction · 0.90

Tested by

no test coverage detected