Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenDAS
vllm_cscc
Commits
4f436782
Unverified
Commit
4f436782
authored
Apr 17, 2026
by
Cyrus Leung
Committed by
GitHub
Apr 17, 2026
Browse files
[Misc] Improve new PR bot trigger condition (#40114)
Signed-off-by:
DarkLight1337
<
tlleungac@connect.ust.hk
>
parent
bf45e6d0
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
.github/workflows/new_pr_bot.yml
.github/workflows/new_pr_bot.yml
+5
-5
No files found.
.github/workflows/new_pr_bot.yml
View file @
4f436782
...
...
@@ -62,14 +62,14 @@ jobs:
const prAuthor = context.payload.pull_request.user.login;
const { data: searchResults } = await github.rest.search.issuesAndPullRequests({
q: `repo:${owner}/${repo} type:pr author:${prAuthor}`,
q: `repo:${owner}/${repo} type:pr
is:merged
author:${prAuthor}`,
per_page: 1,
});
const
author
PRCount = searchResults.total_count;
console.log(`Found ${
author
PRCount} PRs by ${prAuthor}`);
const
merged
PRCount = searchResults.total_count;
console.log(`Found ${
merged
PRCount}
merged
PRs by ${prAuthor}`);
if (
author
PRCount ===
1
) {
if (
merged
PRCount ===
0
) {
console.log(`Posting welcome comment for first-time contributor: ${prAuthor}`);
await github.rest.issues.createComment({
owner,
...
...
@@ -98,5 +98,5 @@ jobs:
].join('\n'),
});
} else {
console.log(`Skipping comment for ${prAuthor} - not
their
first
PR (${authorPRCount} PRs found
)`);
console.log(`Skipping comment for ${prAuthor} - not
a
first
-time contributor (${mergedPRCount} merged PRs
)`);
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment