Skip to content

[ci] Make @claude handler auto-open a draft PR (issue→PR autonomy) #32

Description

@izzywdev

@claude

Context / why: Right now .github/workflows/claude.yml runs anthropics/claude-code-action@v1 with only anthropic_api_key (default mode), so when you resolve an issue you push a claude/issue-* branch and post a "Create PR" link but never open the PR. That breaks the autonomous issue→PR→merge flow (a human has to click "Create PR"). Confirmed from run logs — no error, it's just the default behavior.

Requested change — make issue→PR autonomous (open a DRAFT PR automatically):
Update .github/workflows/claude.yml so that after the action pushes its branch, a draft PR against main is opened automatically and linked back on the issue. Implement whichever is most reliable for the pinned action version:

  • pass a prompt/claude_args that instructs the agent to run gh pr create --draft --fill (and allow the Bash(gh pr create:*) tool), or
  • add a follow-up workflow step / a small companion workflow (on: push to claude/**) that runs gh pr create --draft if no PR exists for that branch.

Keep it a draft PR (preserve the human review gate — do not auto-merge). Permissions are already contents/pull-requests/issues: write. Validate with actionlint.

Note (bootstrap): the PR for THIS issue will still need one manual open since the fix isn't live yet — that's expected and one-time.

On completion: open the (draft) PR and post its link here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions