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