From fa68c6567b031f19db34ddebf1999b343d122e96 Mon Sep 17 00:00:00 2001 From: Saud <65331551+saudsami@users.noreply.github.com> Date: Fri, 1 Nov 2024 16:34:06 +0500 Subject: [PATCH] Update assign-issue.yml (#1597) --- .github/workflows/assign-issue.yml | 34 ++++++++++++------------------ 1 file changed, 14 insertions(+), 20 deletions(-) diff --git a/.github/workflows/assign-issue.yml b/.github/workflows/assign-issue.yml index fc716476f..00f6642a6 100644 --- a/.github/workflows/assign-issue.yml +++ b/.github/workflows/assign-issue.yml @@ -1,24 +1,18 @@ -name: "Assign New Issues" +name: Issue assignment on: - issues: - types: [opened] + issues: + types: [opened] jobs: - assign_issue: - runs-on: ubuntu-latest - steps: - - name: Check if issue has assignees - id: check - run: | - curl -s -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \ - https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.issue.number }} \ - | jq '.assignees | length' > assignee_count.txt - - - name: Assign issue if no assignees - if: ${{ steps.check.outputs.assignee_count == 0 }} - uses: actions-ecosystem/action-add-issue-assignees@v1 - with: - assignees: "saudsami" - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + auto-assign: + runs-on: ubuntu-latest + permissions: + issues: write + steps: + - name: 'Auto-assign issue' + uses: pozil/auto-assign-issue@v2 + with: + assignees: saudsami, atovpeko + numOfAssignee: 2 + allowSelfAssign: false