From 96e2ab2b1968864c094ceb553978073c30765f8b Mon Sep 17 00:00:00 2001 From: keito4 Date: Sun, 2 Aug 2026 16:47:10 +0900 Subject: [PATCH 1/3] =?UTF-8?q?fix(ci):=20Claude=20PR=E3=82=92=E3=83=AA?= =?UTF-8?q?=E3=83=9D=E3=82=B8=E3=83=88=E3=83=AA=E6=8B=85=E5=BD=93=E8=80=85?= =?UTF-8?q?=E3=81=B8=E8=87=AA=E5=8B=95=E3=82=A2=E3=82=B5=E3=82=A4=E3=83=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- templates/workflows/claude.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/templates/workflows/claude.yml b/templates/workflows/claude.yml index 07eb2a70..d61a2451 100644 --- a/templates/workflows/claude.yml +++ b/templates/workflows/claude.yml @@ -141,6 +141,7 @@ jobs: DEFAULT_BRANCH: ${{ github.event.repository.default_branch }} ISSUE_NUMBER: ${{ github.event.issue.number }} ISSUE_TITLE: ${{ github.event.issue.title }} + PR_ASSIGNEE: ${{ vars.CLAUDE_PR_ASSIGNEE }} run: | if [ -z "$CLAUDE_BRANCH" ]; then echo "Claude did not create a branch. Skipping PR creation." @@ -165,8 +166,14 @@ jobs: BODY=$(printf "Closes #%s\n\nCreated automatically from Claude Code branch \`%s\`." "$ISSUE_NUMBER" "$CLAUDE_BRANCH") + ASSIGNEE_ARGS=() + if [ -n "$PR_ASSIGNEE" ]; then + ASSIGNEE_ARGS=(--assignee "$PR_ASSIGNEE") + fi + gh pr create \ --head "$CLAUDE_BRANCH" \ --base "$DEFAULT_BRANCH" \ --title "$TITLE" \ - --body "$BODY" + --body "$BODY" \ + "${ASSIGNEE_ARGS[@]}" From 7e7d44c22f7769973539a016797d7bcea17d5c89 Mon Sep 17 00:00:00 2001 From: keito4 Date: Sun, 2 Aug 2026 16:47:14 +0900 Subject: [PATCH 2/3] =?UTF-8?q?fix(ci):=20Claude=20PR=E3=82=92=E3=83=AA?= =?UTF-8?q?=E3=83=9D=E3=82=B8=E3=83=88=E3=83=AA=E6=8B=85=E5=BD=93=E8=80=85?= =?UTF-8?q?=E3=81=B8=E8=87=AA=E5=8B=95=E3=82=A2=E3=82=B5=E3=82=A4=E3=83=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/claude.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/claude.yml b/.github/workflows/claude.yml index 9b146591..422563fe 100644 --- a/.github/workflows/claude.yml +++ b/.github/workflows/claude.yml @@ -126,6 +126,7 @@ jobs: DEFAULT_BRANCH: ${{ github.event.repository.default_branch }} ISSUE_NUMBER: ${{ github.event.issue.number }} ISSUE_TITLE: ${{ github.event.issue.title }} + PR_ASSIGNEE: ${{ vars.CLAUDE_PR_ASSIGNEE }} run: | if [ -z "$CLAUDE_BRANCH" ]; then echo "Claude did not create a branch. Skipping PR creation." @@ -150,8 +151,14 @@ jobs: BODY=$(printf "Closes #%s\n\nCreated automatically from Claude Code branch \`%s\`." "$ISSUE_NUMBER" "$CLAUDE_BRANCH") + ASSIGNEE_ARGS=() + if [ -n "$PR_ASSIGNEE" ]; then + ASSIGNEE_ARGS=(--assignee "$PR_ASSIGNEE") + fi + gh pr create \ --head "$CLAUDE_BRANCH" \ --base "$DEFAULT_BRANCH" \ --title "$TITLE" \ - --body "$BODY" + --body "$BODY" \ + "${ASSIGNEE_ARGS[@]}" From 6f565740b11cfe66c66b814b28d1e96bfa0e49ef Mon Sep 17 00:00:00 2001 From: keito4 Date: Sun, 2 Aug 2026 16:47:18 +0900 Subject: [PATCH 3/3] =?UTF-8?q?test(ci):=20Claude=20PR=E3=81=AE=E8=87=AA?= =?UTF-8?q?=E5=8B=95=E3=82=A2=E3=82=B5=E3=82=A4=E3=83=B3=E5=A5=91=E7=B4=84?= =?UTF-8?q?=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test/claude-workflow-contract.test.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/claude-workflow-contract.test.js b/test/claude-workflow-contract.test.js index 672cab73..4bf7314d 100644 --- a/test/claude-workflow-contract.test.js +++ b/test/claude-workflow-contract.test.js @@ -63,6 +63,9 @@ describe('Claude workflow contracts', () => { expect(workflow).toContain('name: Create pull request from Claude branch'); expect(workflow).toContain('GH_TOKEN: ${{ secrets.CLAUDE_PR_GITHUB_TOKEN || github.token }}'); expect(workflow).toContain('gh pr create'); + expect(workflow).toContain('PR_ASSIGNEE: ${{ vars.CLAUDE_PR_ASSIGNEE }}'); + expect(workflow).toContain('ASSIGNEE_ARGS=(--assignee "$PR_ASSIGNEE")'); + expect(workflow).toContain('"${ASSIGNEE_ARGS[@]}"'); expect(workflow).toContain('git ls-remote --exit-code --heads origin "$CLAUDE_BRANCH"'); // 変更なしタスク(ブランチ未push)は正常終了として扱う(false failure 防止) expect(workflow).toContain('Claude branch $CLAUDE_BRANCH was not pushed (no code changes). Skipping PR creation.');