fix(tools): welcomer workflow (#46610)

* fix(tools): welcomer workflow

* fix: revert blankspace changes
This commit is contained in:
Naomi Carrigan
2022-06-22 04:37:03 -07:00
committed by GitHub
parent 11143178f6
commit e2e313bfc8
+7 -2
View File
@@ -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({