mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-05-28 18:26:54 +00:00
fix(tools): welcomer workflow (#46610)
* fix(tools): welcomer workflow * fix: revert blankspace changes
This commit is contained in:
@@ -14,13 +14,18 @@ jobs:
|
||||
uses: actions/github-script@7a5c598405937d486b0331594b5da2b14db670da # tag=v6
|
||||
with:
|
||||
script: |
|
||||
const creator = context.payload.sender.login;
|
||||
const pull = await github.rest.pulls.get({
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
pull_number: context.issue.number
|
||||
});
|
||||
const creator = pull.data.user.login;
|
||||
const repo = `${context.repo.owner}/${context.repo.repo}`;
|
||||
const pulls = await github.rest.search.issuesAndPullRequests({
|
||||
q: `repo:${repo}+author:${creator}+is:pr+is:merged`
|
||||
});
|
||||
// This means they've got merged PRs.
|
||||
if (pulls?.data?.total_count) {
|
||||
if (pulls?.data?.total_count > 1) {
|
||||
return;
|
||||
}
|
||||
github.rest.issues.createComment({
|
||||
|
||||
Reference in New Issue
Block a user