From 59f7cb470285543a4c440c42997d8860b0c303b4 Mon Sep 17 00:00:00 2001 From: gaureshpai Date: Tue, 21 Oct 2025 23:15:51 +0530 Subject: [PATCH] chore(ci): enhance welcome workflow for new contributors - Renamed workflow to "Welcome New Contributors" - Replaced custom github-script steps with actions/first-interaction@v1 - Added condition to skip bot accounts (Dependabot, GitHub Actions) - Improved greeting messages for issues and pull requests --- .github/workflows/welcome.yml | 44 +++++++++++------------------------ 1 file changed, 14 insertions(+), 30 deletions(-) diff --git a/.github/workflows/welcome.yml b/.github/workflows/welcome.yml index 33b658a..c3c004b 100644 --- a/.github/workflows/welcome.yml +++ b/.github/workflows/welcome.yml @@ -1,4 +1,4 @@ -name: Welcome Contributors +name: Welcome New Contributors on: issues: @@ -7,40 +7,24 @@ on: types: [opened] jobs: - greet-contributors: + greeting: + name: Greet First-Time Contributors runs-on: ubuntu-latest permissions: issues: write pull-requests: write + if: ${{ github.actor != 'dependabot[bot]' && github.actor != 'github-actions[bot]' }} steps: - - name: Greet on New Issue - uses: actions/github-script@v7 - if: github.event_name == 'issues' + - uses: actions/first-interaction@v1 with: - script: | - const body = `πŸ‘‹ Hello @${{ github.actor }}! + repo-token: ${{ secrets.GITHUB_TOKEN }} + issue-message: | + πŸ‘‹ Hi @${{ github.actor }}! - Thank you for opening an issue. We appreciate your contribution and will review it as soon as possible.`; + Thanks for opening your first issue here πŸŽ‰ + We appreciate your contribution and will review it as soon as possible. + pr-message: | + πŸŽ‰ Hi @${{ github.actor }}! - github.rest.issues.createComment({ - issue_number: context.issue.number, - owner: context.repo.owner, - repo: context.repo.repo, - body: body - }); - - - name: Greet on New Pull Request - uses: actions/github-script@v7 - if: github.event_name == 'pull_request_target' - with: - script: | - const body = `πŸŽ‰ Welcome, @${{ github.actor }}! - - Thank you for submitting a Pull Request! We're thrilled to see your contribution. Our team will review it shortly.`; - - github.rest.issues.createComment({ - issue_number: context.issue.number, - owner: context.repo.owner, - repo: context.repo.repo, - body: body - }); \ No newline at end of file + Thanks for submitting your first Pull Request! + We’re thrilled to have your contribution and will review it shortly. \ No newline at end of file