@tduncan / Nvidia-Optimization-Stack-VLLM Mirror · read-only / commits / c5041f899f
Fork 0

A high-throughput and memory-efficient inference and serving engine for LLMs

Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git

Synced Nov 14, 05:30 UTC

[CI] improve pr comments bot (#23380)

Simon Mo committed Aug 21, 2025 at 14:49 UTC c5041f899f586644326dc67b21d7de50c62eb410
1 file changed +8 -10
.github/workflows/reminder_comment.yml
+8 -10
@@ -17,20 +17,18 @@ jobs:
17 const prAuthor = context.payload.pull_request.user.login;
18
19 // Check if this is the author's first PR in this repository
20 - const { data: allPRs } = await github.rest.pulls.list({
21 - owner: context.repo.owner,
22 - repo: context.repo.repo,
23 - state: 'all',
24 - per_page: 100
20 + // Use GitHub's search API to find all PRs by this author
21 + const { data: searchResults } = await github.rest.search.issuesAndPullRequests({
22 + q: `repo:${context.repo.owner}/${context.repo.repo} type:pr author:${prAuthor}`,
23 + per_page: 100
24 });
25
27 - // Filter to find PRs by this author
28 - const authorPRs = allPRs.filter(pr => pr.user.login === prAuthor);
26 + const authorPRCount = searchResults.total_count;
27
30 - console.log(`Found ${authorPRs.length} PRs by ${prAuthor}`);
28 + console.log(`Found ${authorPRCount} PRs by ${prAuthor}`);
29
30 // Only post comment if this is the first PR (only one PR by this author)
33 - if (authorPRs.length === 1) {
31 + if (authorPRCount === 1) {
32 console.log(`Posting welcome comment for first-time contributor: ${prAuthor}`);
33 await github.rest.issues.createComment({
34 owner: context.repo.owner,
@@ -46,7 +44,7 @@ jobs:
44 '🚀'
45 });
46 } else {
49 - console.log(`Skipping comment for ${prAuthor} - not their first PR (${authorPRs.length} PRs found)`);
47 + console.log(`Skipping comment for ${prAuthor} - not their first PR (${authorPRCount} PRs found)`);
48 }
49 } catch (error) {
50 console.error('Error checking PR history or posting comment:', error);