From 6365a8f4bb282c88cd652f073e35cf98a58a9956 Mon Sep 17 00:00:00 2001 From: Matt Fiddaman Date: Thu, 25 Sep 2025 21:03:44 +0100 Subject: [PATCH] replace deprecated function in count points script (#5791) * fix deprecated function call in count points script * note --- .github/scripts/count-points.mjs | 6 +++--- upcoming-release-notes/5791.md | 6 ++++++ 2 files changed, 9 insertions(+), 3 deletions(-) create mode 100644 upcoming-release-notes/5791.md diff --git a/.github/scripts/count-points.mjs b/.github/scripts/count-points.mjs index 0662fb0346..2f5c86fae6 100644 --- a/.github/scripts/count-points.mjs +++ b/.github/scripts/count-points.mjs @@ -2,7 +2,7 @@ import { Octokit } from '@octokit/rest'; import { minimatch } from 'minimatch'; import pLimit from 'p-limit'; -const limit = pLimit(30); +const limit = pLimit(50); /** Repository-specific configuration for points calculation */ const REPOSITORY_CONFIG = new Map([ @@ -129,13 +129,13 @@ async function countContributorPoints(repo) { // Get all PRs using search const searchQuery = `repo:${owner}/${repo} is:pr is:merged merged:${since.toISOString()}..${until.toISOString()}`; const recentPRs = await octokit.paginate( - octokit.search.issuesAndPullRequests, + 'GET /search/issues', { q: searchQuery, per_page: 100, advanced_search: true, }, - response => response.data, + response => response.data.filter(pr => pr.number), ); // Get reviews and PR details for each PR diff --git a/upcoming-release-notes/5791.md b/upcoming-release-notes/5791.md new file mode 100644 index 0000000000..a1a8ce2a0a --- /dev/null +++ b/upcoming-release-notes/5791.md @@ -0,0 +1,6 @@ +--- +category: Bugfix +authors: [matt-fidd] +--- + +Fix deprecation warning in count-points script