MCPcopy
hub / github.com/gitify-app/gitify / fetchDiscussionByNumber

Function fetchDiscussionByNumber

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

Source from the content-addressed store, hash-verified

214 * Fetch GitHub Discussion by Discussion Number.
215 */
216export async function fetchDiscussionByNumber(
217 notification: GitifyNotification,
218): Promise<FetchDiscussionByNumberQuery> {
219 const number = getNumberFromUrl(notification.subject.url!);
220
221 return performGraphQLRequest(
222 notification.account,
223 FetchDiscussionByNumberDocument,
224 {
225 owner: notification.repository.owner.login,
226 name: notification.repository.name,
227 number: number,
228 firstLabels: Constants.GRAPHQL_ARGS.FIRST_LABELS,
229 lastThreadedComments: Constants.GRAPHQL_ARGS.LAST_THREADED_COMMENTS,
230 lastReplies: Constants.GRAPHQL_ARGS.LAST_REPLIES,
231 includeIsAnswered: isAnsweredDiscussionFeatureSupported(
232 notification.account,
233 ),
234 },
235 );
236}
237
238/**
239 * Fetch GitHub Issue by Issue Number.

Callers 2

enrichMethod · 0.90
client.test.tsFile · 0.90

Calls 3

getNumberFromUrlFunction · 0.90
performGraphQLRequestFunction · 0.90

Tested by

no test coverage detected