Skip to content

Commit

Permalink
fix: discussion graphql query incorrect (#56)
Browse files Browse the repository at this point in the history
  • Loading branch information
zackpollard authored Dec 19, 2024
1 parent b23fd77 commit 29beb7a
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions backend/src/repositories/github.repository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,13 @@ export class GithubRepository implements IGithubRepository {
async getDiscussionsCounts(repo: GithubRepo) {
const { repository } = await this.graphqlWithAuth<{
repository: {
discussions: {
total: {
totalCount: number;
};
open: {
totalCount: number;
};
closed: {
totalCount: number;
};
};
Expand All @@ -142,9 +148,9 @@ export class GithubRepository implements IGithubRepository {
);

return {
total: repository.discussions.totalCount,
open: repository.discussions.totalCount,
closed: repository.discussions.totalCount,
total: repository.total.totalCount,
open: repository.open.totalCount,
closed: repository.closed.totalCount,
};
}

Expand Down

0 comments on commit 29beb7a

Please sign in to comment.