diff --git a/.github/workflows/onboarding-bot.yml b/.github/workflows/onboarding-bot.yml new file mode 100644 index 0000000..fa876e0 --- /dev/null +++ b/.github/workflows/onboarding-bot.yml @@ -0,0 +1,49 @@ +name: "Contributor Onboarding & Triage" + +on: + issues: + types: [opened] + workflow_dispatch: + +jobs: + welcome: + runs-on: ubuntu-latest + permissions: + issues: write + steps: + - name: "First Interaction Triage" + uses: actions/first-interaction@v1 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + issue-message: | + ## Welcome to Gitbun! + @${{ github.event.issue.user.login }}, thank you for opening this issue. We appreciate you helping us improve! + + **Quick Checklist:** + - [ ] Have you checked if a similar [issue](https://github.com/nirvik34/gitbun/issues) already exists? + - [ ] Have you read our [Contributing Guidelines](https://github.com/nirvik34/gitbun/blob/main/CONTRIBUTING.md)? + + A maintainer will review your report shortly. In the meantime, ensure your description provides enough context for us to help you! + + + - name: "Add Triage Label" + uses: actions/github-script@v7 + with: + script: | + if (!context.payload.issue) return; + const response = await github.rest.issues.listForRepo({ + owner: context.repo.owner, + repo: context.repo.repo, + creator: context.payload.issue.user.login, + state: 'all', + per_page: 2 + }); + + if (response.data.length <= 1) { + await github.rest.issues.addLabels({ + issue_number: context.issue.number, + owner: context.repo.owner, + repo: context.repo.repo, + labels: ['triage'] + }); + }