diff --git a/.github/workflows/welcome.yml b/.github/workflows/welcome.yml deleted file mode 100644 index f9bd220c1df..00000000000 --- a/.github/workflows/welcome.yml +++ /dev/null @@ -1,49 +0,0 @@ -name: Github - Welcome First-timers -on: - pull_request: - types: - - closed - -jobs: - welcome: - runs-on: ubuntu-latest - - steps: - - name: Welcome New Contributors - if: github.event.pull_request.merged == true - uses: actions/github-script@7a5c598405937d486b0331594b5da2b14db670da # tag=v6 - with: - github-token: ${{ secrets.CROWDIN_CAMPERBOT_PAT }} - script: | - 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 excludedCreators = ["renovate[bot]", "camperbot", "github-actions[bot]"]; - if (excludedCreators.includes(creator)) { - return; - } - 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 > 1) { - return; - } - github.rest.issues.createComment({ - issue_number: context.issue.number, - owner: context.repo.owner, - repo: context.repo.repo, - body: ` - #### :sparkles: :tada: **AWESOME!** :tada: :sparkles: - - Hi @${creator}, - - Thanks for this pull request and for contributing to the code-base for the first time. We are looking forward to more contributions from you in the future. - - Cheers & happy contributing! - ` - });