Skip to content

Commit d64f510

Browse files
committed
feat: add PR assignment check workflow
1 parent 96994f1 commit d64f510

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: PR Assignment Check
2+
3+
on:
4+
pull_request_target:
5+
types: [opened, reopened, edited]
6+
workflow_dispatch:
7+
inputs:
8+
pr_number:
9+
description: 'PR number to check'
10+
required: true
11+
type: number
12+
13+
jobs:
14+
check:
15+
runs-on: ubuntu-latest
16+
permissions:
17+
contents: read
18+
issues: read
19+
pull-requests: write
20+
steps:
21+
- uses: anthropics/claude-code-action@v1
22+
with:
23+
anthropic_api_key: ${{ secrets.CLAUDE_CODE_ANTHROPIC_API_KEY }}
24+
prompt: |
25+
EXEMPT USERS: @maxprilutskiy, @vrcprl, @davidturnbull, @monicabe, @sumitsaurabh927, @AleksandrSl (skip all checks if PR author is one of these)
26+
27+
Check if this PR references any issues (via "Closes #123", "Fixes #456", etc.).
28+
29+
For each referenced issue:
30+
1. Check if the issue has assignees
31+
2. If yes, check if the PR author is one of the assignees
32+
3. If the PR author is NOT an assignee, close this PR with a brief, friendly comment (2-3 sentences, no emojis) explaining:
33+
- The issue was already assigned to someone else
34+
- They should wait to be assigned before submitting PRs
35+
- Encourage them to find other unassigned issues
36+
37+
If no issues referenced or PR author is properly assigned, do nothing.
38+
claude_args: "--max-turns 3"

0 commit comments

Comments
 (0)