Skip to content

♻️ci: refactor auto-assign.yml #235

♻️ci: refactor auto-assign.yml

♻️ci: refactor auto-assign.yml #235

Workflow file for this run

name: Auto Assign
on:
issues:
types:
- opened
- reopened
pull_request_target:
types:
- opened
- reopened
env:
GH_TOKEN: ${{ github.token }}
MEMBERS: |
HaradaTakayuki
kazutan1230
Marukome0743
tanePON
jobs:
assign:
runs-on: ubuntu-latest
steps:
- 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