name: Welcome New Contributors on: pull_request: types: [opened] permissions: pull-requests: write models: read jobs: welcome: runs-on: ubuntu-latest if: github.event.pull_request.author_association == 'FIRST_TIME_CONTRIBUTOR' steps: - name: Generate welcome message uses: actions/ai-inference@v2 id: ai with: prompt: | Write a friendly welcome message for a first-time contributor. Include: 1. Thank them for their first PR 2. Mention checking CONTRIBUTING.md 3. Offer to help if they have questions Keep it brief and encouraging. model: openai/gpt-4o-mini temperature: 0.7 - name: Post welcome comment uses: actions/github-script@v8 with: script: | const message = `${{ steps.ai.outputs.response }}`; await github.rest.issues.createComment({ owner: context.repo.owner, repo: context.repo.repo, issue_number: ${{ github.event.pull_request.number }}, body: message });