Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
Apr 22, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading