( notification: GitifyNotification, )
| 260 | * Fetch GitHub Pull Request by PR Number. |
| 261 | */ |
| 262 | export 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 | */ |
| 286 | export async function fetchNotificationDetailsForList( |
| 287 | notifications: GitifyNotification[], |
| 288 | ): Promise< |
no test coverage detected