From ac7f125eb50ee8ea38b9addb7806273fd8fc0d0a Mon Sep 17 00:00:00 2001 From: Jesse Hills <3060199+jesserockz@users.noreply.github.com> Date: Wed, 23 Jul 2025 13:22:54 +1200 Subject: [PATCH 1/2] [CI] Paginate codeowner comments to make sure we find it (#9817) --- .github/workflows/codeowner-review-request.yml | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/.github/workflows/codeowner-review-request.yml b/.github/workflows/codeowner-review-request.yml index 121619e049..ab3377365d 100644 --- a/.github/workflows/codeowner-review-request.yml +++ b/.github/workflows/codeowner-review-request.yml @@ -182,11 +182,14 @@ jobs: }); // Check for previous comments from this workflow to avoid duplicate pings - const { data: comments } = await github.rest.issues.listComments({ - owner, - repo, - issue_number: pr_number - }); + const comments = await github.paginate( + github.rest.issues.listComments, + { + owner, + repo, + issue_number: pr_number + } + ); const previouslyPingedUsers = new Set(); const previouslyPingedTeams = new Set(); @@ -194,7 +197,6 @@ jobs: // Look for comments from github-actions bot that contain our bot marker const workflowComments = comments.filter(comment => comment.user.type === 'Bot' && - comment.user.login === 'github-actions[bot]' && comment.body.includes(BOT_COMMENT_MARKER) ); From d7a5db3dda6655d2e2795eca12af80012ffba2fc Mon Sep 17 00:00:00 2001 From: Jesse Hills <3060199+jesserockz@users.noreply.github.com> Date: Wed, 23 Jul 2025 13:23:06 +1200 Subject: [PATCH 2/2] [CI] Paginate codeowner comments to make sure we find it (#9818) --- .github/workflows/issue-codeowner-notify.yml | 23 ++++++++++++-------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/.github/workflows/issue-codeowner-notify.yml b/.github/workflows/issue-codeowner-notify.yml index 27976a7952..3639d346f5 100644 --- a/.github/workflows/issue-codeowner-notify.yml +++ b/.github/workflows/issue-codeowner-notify.yml @@ -29,6 +29,9 @@ jobs: console.log(`Processing issue #${issue_number} with label: ${labelName}`); + // Hidden marker to identify bot comments from this workflow + const BOT_COMMENT_MARKER = ''; + // Extract component name from label const componentName = labelName.replace('component: ', ''); console.log(`Component: ${componentName}`); @@ -93,11 +96,14 @@ jobs: ); // Check for previous comments from this workflow to avoid duplicate pings - const { data: comments } = await github.rest.issues.listComments({ - owner, - repo, - issue_number: issue_number - }); + const comments = await github.paginate( + github.rest.issues.listComments, + { + owner, + repo, + issue_number: issue_number + } + ); const previouslyPingedUsers = new Set(); const previouslyPingedTeams = new Set(); @@ -105,9 +111,8 @@ jobs: // Look for comments from github-actions bot that contain codeowner pings for this component const workflowComments = comments.filter(comment => comment.user.type === 'Bot' && - comment.user.login === 'github-actions[bot]' && - comment.body.includes(`component: ${componentName}`) && - comment.body.includes("you've been identified as a codeowner") + comment.body.includes(BOT_COMMENT_MARKER) && + comment.body.includes(`component: ${componentName}`) ); // Extract previously mentioned users and teams from workflow comments @@ -140,7 +145,7 @@ jobs: // Create comment body const mentionString = allMentions.join(', '); - const commentBody = `šŸ‘‹ Hey ${mentionString}!\n\nThis issue has been labeled with \`component: ${componentName}\` and you've been identified as a codeowner of this component. Please take a look when you have a chance!\n\nThanks for maintaining this component! šŸ™`; + const commentBody = `${BOT_COMMENT_MARKER}\nšŸ‘‹ Hey ${mentionString}!\n\nThis issue has been labeled with \`component: ${componentName}\` and you've been identified as a codeowner of this component. Please take a look when you have a chance!\n\nThanks for maintaining this component! šŸ™`; // Post comment await github.rest.issues.createComment({