Skip to content

Commit fea5daa

Browse files
DTTerastarorca-ide
andauthored
ci: replace auto-assign workflow with native gh CLI version (#29)
Drop the pozil/auto-assign-issue action in favor of a hand-rolled gh-CLI step. Differences vs. the previous workflow: - Trigger: pull_request_target (opened, reopened, ready_for_review) instead of pull_request opened. The _target variant runs in the base repo's context, which is what's needed for the assignment to work on PRs from forks. - Skip if assignees[0] is already set — don't clobber an existing manual assignment. - Drops auto-assignment of issues. If you want issue auto-assignment back, add a separate workflow keyed off issues.opened. Co-authored-by: Orca <help@stably.ai>
1 parent 4d679f0 commit fea5daa

1 file changed

Lines changed: 15 additions & 15 deletions

File tree

.github/workflows/auto-assign.yml

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
1-
name: Auto Assign
1+
name: Auto-assign PR
2+
23
on:
3-
issues:
4-
types: [opened]
5-
pull_request:
6-
types: [opened]
4+
pull_request_target:
5+
types: [opened, reopened, ready_for_review]
6+
7+
permissions:
8+
pull-requests: write
9+
710
jobs:
8-
run:
11+
assign:
12+
if: github.event.pull_request.assignees[0] == null
913
runs-on: ubuntu-latest
10-
permissions:
11-
issues: write
12-
pull-requests: write
1314
steps:
14-
- name: 'Auto-assign issue'
15-
uses: pozil/auto-assign-issue@v1
16-
with:
17-
repo-token: ${{ secrets.GITHUB_TOKEN }}
18-
assignees: DTTerastar
19-
numOfAssignee: 1
15+
- name: Assign PR to DTTerastar
16+
env:
17+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
18+
PR_URL: ${{ github.event.pull_request.html_url }}
19+
run: gh pr edit "$PR_URL" --add-assignee DTTerastar

0 commit comments

Comments
 (0)