fix maintainer points counting script PR categorisation (#8535)

* fix count points release note finding

* note

* coderabbit
This commit is contained in:
Matt Fiddaman
2026-07-21 20:38:26 +00:00
committed by GitHub
parent a81408595c
commit 2c3797de2f
2 changed files with 19 additions and 4 deletions
+13 -4
View File
@@ -296,10 +296,19 @@ async function countContributorPoints() {
// Award points to PR author if they are a core maintainer
const prAuthor = pr.user?.login;
if (prAuthor && orgMemberLogins.has(prAuthor)) {
const releaseNoteFile = modifiedFiles.find(
file =>
file.filename === `upcoming-release-notes/${pr.number}.md`,
);
const isReleaseNoteFile = file =>
file.filename.startsWith('upcoming-release-notes/') &&
file.filename.endsWith('.md') &&
file.filename !== 'upcoming-release-notes/README.md';
const releaseNoteFile =
modifiedFiles.find(
file =>
file.filename === `upcoming-release-notes/${pr.number}.md` &&
file.status !== 'removed',
) ??
modifiedFiles.find(
file => file.status === 'added' && isReleaseNoteFile(file),
);
const categoryAndPoints = await getPRCategoryAndPoints(
octokit,
owner,
@@ -0,0 +1,6 @@
---
category: Maintenance
authors: [matt-fidd]
---
Fix maintainer points counting script PR categorisation