Skip to content

Commit

Permalink
Merge pull request #254 from Marukome0743/pr254
Browse files Browse the repository at this point in the history
♻️ci: refactor auto-assign.yml
  • Loading branch information
Marukome0743 authored Apr 22, 2024
2 parents d4aea14 + 90f2859 commit 177a221
Showing 1 changed file with 22 additions and 13 deletions.
35 changes: 22 additions & 13 deletions .github/workflows/auto-assign.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,31 @@ on:
- opened
- reopened

permissions:
issues: write
pull-requests: write

env:
REPOSITORY_OWNER: OpenUp-LabTakizawa
GH_TOKEN: ${{ github.token }}
MEMBERS: |
HaradaTakayuki
kazutan1230
Marukome0743
tanePON
jobs:
run:
assign:
runs-on: ubuntu-latest

steps:
- name: Auto-assign issue
if: github.repository_owner == env.REPOSITORY_OWNER
uses: pozil/auto-assign-issue@v1
with:
assignees: HaradaTakayuki,kazutan1230,Marukome0743,tanePON
numOfAssignee: 1
abortIfPreviousAssignees: true
- name: Assign Issue
if: github.event_name == 'issues' && toJSON(github.event.issue.assignees) == '[]'
run: |
echo "$MEMBERS" |
tail -n +2 |
shuf -n 1 |
xargs gh issue edit ${{ github.event.issue.number }} --repo ${{ github.repository }} --add-assignee
- name: Assign Pull Request
if: github.event_name == 'pull_request_target' && toJSON(github.event.pull_request.assignees) == '[]'
run: |
echo "$MEMBERS" |
tail -n +2 |
shuf -n 1 |
xargs gh pr edit ${{ github.event.pull_request.number }} --repo ${{ github.repository }} --add-assignee

0 comments on commit 177a221

Please sign in to comment.