Skip to content

Commit

Permalink
Update assign-issue.yml (#1597)
Browse files Browse the repository at this point in the history
  • Loading branch information
saudsami authored Nov 1, 2024
1 parent 8b9fcc3 commit fa68c65
Showing 1 changed file with 14 additions and 20 deletions.
34 changes: 14 additions & 20 deletions .github/workflows/assign-issue.yml
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit fa68c65

Please sign in to comment.