Skip to content

Coco Issues Create

Griffen Fargo edited this page Aug 2, 2026 · 1 revision

Coco Issues Create

coco issues create opens a new issue on the detected forge (GitHub, GitLab, Bitbucket, or Gitea). It can pre-fill the title and body from a coco review finding, turning a review violation into a tracked issue in one step.

Basic Usage

# Create an issue with explicit title and body
coco issues create --title "Fix login timeout" --body "The session expires..."

# Draft an issue from a review finding (pipe review output)
coco review --json | coco issues create --from-review

# Interactive: review and edit before creating
coco issues create --title "Refactor auth module" -i

# Dry run: see what would be created without creating it
coco issues create --title "Add tests" --dry-run

# JSON output (prints title/body without creating)
coco issues create --title "Add tests" --json

Options

Flag Default Description
--title <string> Issue title (required unless --from-review provides one)
--body <string> Issue body
--from-review false Draft the issue from coco review --json findings piped on stdin
-i, --interactive false Review and optionally edit the issue before creating
--dry-run false Print the generated title/body without creating the issue
--json false Emit { title, body } as JSON on stdout

Workflow: Review Finding to Issue

The most common workflow chains coco review into coco issues create:

# Review staged changes, pipe findings to issue creation
coco review --json --staged | coco issues create --from-review -i

When multiple findings exist and stdin is interactive, coco presents a picker sorted by severity (highest first). Otherwise the highest-severity finding is selected automatically.

The findingToIssue formatter maps a review finding into:

  • Title: the finding's title prefixed with the file path
  • Body: severity, file path, line context, the finding's description, and suggested fix

Interactive Mode

With -i / --interactive, coco shows the generated title and body, then offers:

  • Create — submit as-is
  • Edit & create — open in $EDITOR for modification (first line = title, blank line, then body)
  • Cancel — abort without creating

Multi-Forge Support

coco issues create detects the forge from the git remote and dispatches through the appropriate API:

  • GitHub / GHE: gh issue create
  • GitLab: glab api POST
  • Bitbucket Cloud: REST API
  • Gitea / Forgejo: REST API

The command checks authentication status before attempting creation and surfaces clear recovery hints when the forge CLI is unavailable or unauthenticated.

See Also

Clone this wiki locally