From 9bbea04c1084d7113cedf487c226d011d18d240b Mon Sep 17 00:00:00 2001 From: krzysdz Date: Mon, 3 Aug 2026 12:19:24 +0200 Subject: [PATCH] Use stargazerCount instead of restricted stargazers GitHub has recently blocked access to the list of stargazers and watchers. This includes the `stargazers` property in GraphQL, which in this case can be replaced with `stargazerCount`. Fortunately, `watchers.totalCount` still works. https://github.blog/changelog/2026-06-30-upcoming-access-restrictions-to-public-api-endpoints-and-ui-views/ --- lib/github.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/github.js b/lib/github.js index 152473a..751faf6 100644 --- a/lib/github.js +++ b/lib/github.js @@ -16,9 +16,7 @@ const repoQuerySnip = `{ createdAt updatedAt pushedAt - stargazers { - totalCount - } + stargazerCount watchers { totalCount } @@ -132,7 +130,7 @@ class Repo { this.created = repo.createdAt this.updated = repo.updatedAt this.pushed = repo.pushedAt - this.stars = repo.stargazers.totalCount + this.stars = repo.stargazerCount this.watchers = repo.watchers.totalCount this.forks = repo.forks.totalCount this.openIssues = repo.issues.totalCount