auto-discoveredEdit on GitHub

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

bash
1# Create an issue with explicit title and body
2coco issues create --title "Fix login timeout" --body "The session expires..."
3
4# Draft an issue from a review finding (pipe review output)
5coco review --json | coco issues create --from-review
6
7# Interactive: review and edit before creating
8coco issues create --title "Refactor auth module" -i
9
10# Dry run: see what would be created without creating it
11coco issues create --title "Add tests" --dry-run
12
13# JSON output (prints title/body without creating)
14coco issues create --title "Add tests" --json

Options

FlagDefaultDescription
--title <string>Issue title (required unless --from-review provides one)
--body <string>Issue body
--from-reviewfalseDraft the issue from coco review --json findings piped on stdin
-i, --interactivefalseReview and optionally edit the issue before creating
--dry-runfalsePrint the generated title/body without creating the issue
--jsonfalseEmit { title, body } as JSON on stdout

Workflow: Review Finding to Issue

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

bash
# 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