From 8dd585bb463ec5b519a05d3631266c7450bf412f Mon Sep 17 00:00:00 2001 From: Daksh Jain Date: Fri, 15 May 2026 05:14:28 +0530 Subject: [PATCH 1/8] Create onboarding-bot.yml --- .github/workflows/onboarding-bot.yml | 1 + 1 file changed, 1 insertion(+) create mode 100644 .github/workflows/onboarding-bot.yml diff --git a/.github/workflows/onboarding-bot.yml b/.github/workflows/onboarding-bot.yml new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/.github/workflows/onboarding-bot.yml @@ -0,0 +1 @@ + From 0f91cc72ed9da9e0180dd18c92daa22122b8bce7 Mon Sep 17 00:00:00 2001 From: Daksh Jain Date: Fri, 15 May 2026 05:38:11 +0530 Subject: [PATCH 2/8] Create onboarding-bot workflow for issue triage Add onboarding workflow for new contributors with triage. --- .github/workflows/onboarding-bot.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/.github/workflows/onboarding-bot.yml b/.github/workflows/onboarding-bot.yml index 8b13789..00ee6de 100644 --- a/.github/workflows/onboarding-bot.yml +++ b/.github/workflows/onboarding-bot.yml @@ -1 +1,26 @@ +name: "Contributor Onboarding & Triage" +on: + issues: + types: [opened] + +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 }} + # Logic: Executes only if this is the user's first issue in nirvik34/gitbun + issue-message: | + ## Welcome to Gitbun! + @${{ github.actor }}, 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! From a336ea91dcfa4860d3b0c992b53eb88e163f67a5 Mon Sep 17 00:00:00 2001 From: Daksh Jain Date: Fri, 15 May 2026 05:55:47 +0530 Subject: [PATCH 3/8] Add triage label to onboarding bot workflow --- .github/workflows/onboarding-bot.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/onboarding-bot.yml b/.github/workflows/onboarding-bot.yml index 00ee6de..3187fcd 100644 --- a/.github/workflows/onboarding-bot.yml +++ b/.github/workflows/onboarding-bot.yml @@ -24,3 +24,4 @@ jobs: - [ ] 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! + add-labels: 'triage' From 24d2ee239283603da0814ba9b81c08fc4960dbd2 Mon Sep 17 00:00:00 2001 From: Daksh Jain Date: Fri, 15 May 2026 19:33:38 +0530 Subject: [PATCH 4/8] test --- .github/workflows/onboarding-bot.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/onboarding-bot.yml b/.github/workflows/onboarding-bot.yml index 3187fcd..d086dc0 100644 --- a/.github/workflows/onboarding-bot.yml +++ b/.github/workflows/onboarding-bot.yml @@ -3,6 +3,7 @@ name: "Contributor Onboarding & Triage" on: issues: types: [opened] + workflow_dispatch: jobs: welcome: From 9ddaa123cf8644433487bfd9db3fd66c6119eb43 Mon Sep 17 00:00:00 2001 From: Daksh Jain Date: Fri, 15 May 2026 19:50:49 +0530 Subject: [PATCH 5/8] Add triage label step for first interactions --- .github/workflows/onboarding-bot.yml | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/.github/workflows/onboarding-bot.yml b/.github/workflows/onboarding-bot.yml index d086dc0..43499d1 100644 --- a/.github/workflows/onboarding-bot.yml +++ b/.github/workflows/onboarding-bot.yml @@ -12,6 +12,7 @@ jobs: issues: write steps: - name: "First Interaction Triage" + id: welcome_step uses: actions/first-interaction@v1 with: repo-token: ${{ secrets.GITHUB_TOKEN }} @@ -25,4 +26,16 @@ jobs: - [ ] 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! - add-labels: 'triage' + + + - name: "Add Triage Label" + if: steps.welcome_step.outputs.has-first-interaction == 'true' + uses: actions/github-script@v6 + with: + script: | + github.rest.issues.addLabels({ + issue_number: context.issue.number, + owner: context.repo.owner, + repo: context.repo.repo, + labels: ['triage'] + }) From 895a9e423170bb00dd6e89ecaeda862fd572fa9c Mon Sep 17 00:00:00 2001 From: Daksh Jain Date: Fri, 15 May 2026 20:04:53 +0530 Subject: [PATCH 6/8] Change condition for adding triage label to always --- .github/workflows/onboarding-bot.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/onboarding-bot.yml b/.github/workflows/onboarding-bot.yml index 43499d1..7309b79 100644 --- a/.github/workflows/onboarding-bot.yml +++ b/.github/workflows/onboarding-bot.yml @@ -29,7 +29,7 @@ jobs: - name: "Add Triage Label" - if: steps.welcome_step.outputs.has-first-interaction == 'true' + if: always() uses: actions/github-script@v6 with: script: | From 4f5f9254efa367b09f8ad3fa316fd91304d4f321 Mon Sep 17 00:00:00 2001 From: Daksh Jain Date: Fri, 15 May 2026 20:42:19 +0530 Subject: [PATCH 7/8] final testing approved Refactor onboarding bot workflow to conditionally add triage label based on issue creator's previous issues. --- .github/workflows/onboarding-bot.yml | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/.github/workflows/onboarding-bot.yml b/.github/workflows/onboarding-bot.yml index 7309b79..6888840 100644 --- a/.github/workflows/onboarding-bot.yml +++ b/.github/workflows/onboarding-bot.yml @@ -12,7 +12,6 @@ jobs: issues: write steps: - name: "First Interaction Triage" - id: welcome_step uses: actions/first-interaction@v1 with: repo-token: ${{ secrets.GITHUB_TOKEN }} @@ -29,13 +28,22 @@ jobs: - name: "Add Triage Label" - if: always() uses: actions/github-script@v6 with: script: | - github.rest.issues.addLabels({ - issue_number: context.issue.number, + const response = await github.rest.issues.listForRepo({ owner: context.repo.owner, repo: context.repo.repo, - labels: ['triage'] - }) + creator: context.payload.issue.user.login, + state: 'all', + per_page: 2 // We only need to know if they have more than 1 + }); + + 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'] + }); + } From 07de7c7f5b32b63b16d1e2b44b03a3689b42c209 Mon Sep 17 00:00:00 2001 From: Daksh Jain Date: Fri, 15 May 2026 21:26:25 +0530 Subject: [PATCH 8/8] fix --- .github/workflows/onboarding-bot.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/onboarding-bot.yml b/.github/workflows/onboarding-bot.yml index 6888840..fa876e0 100644 --- a/.github/workflows/onboarding-bot.yml +++ b/.github/workflows/onboarding-bot.yml @@ -15,10 +15,9 @@ jobs: uses: actions/first-interaction@v1 with: repo-token: ${{ secrets.GITHUB_TOKEN }} - # Logic: Executes only if this is the user's first issue in nirvik34/gitbun issue-message: | ## Welcome to Gitbun! - @${{ github.actor }}, thank you for opening this issue. We appreciate you helping us improve! + @${{ 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? @@ -28,15 +27,16 @@ jobs: - name: "Add Triage Label" - uses: actions/github-script@v6 + 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 // We only need to know if they have more than 1 + per_page: 2 }); if (response.data.length <= 1) {