Blake Merryman

A Github CLI Extension for Issue Types

GitHub has a handy issue type field that’s available to organizations. The default values are Bug, Feature, and Task. You can also define your own custom values. They appear in the web interface but, unfortunately, there isn’t a way to interact with issue type via the GitHub CLI.

Inspired by Den Delimarsky’s post, I wrote gh-issue-type, a GitHub CLI extension that adds this functionality.

Overview

It’s fairly straightforward:

# List the issue types available on a repo
gh issue-type list

# Check what type an issue currently has
gh issue-type get 42

# Set the type (case-insensitive)
gh issue-type set 42 bug

# Remove an issue's type
gh issue-type unset 42

# List issues by type
gh issue-type issues Bug --state all

It’s implemented as a single bash script with no build step and no external dependencies. Installation is simple:

gh extension install blakemerryman/gh-issue-type

gh handles the rest.

NOTE: Issue types are currently only available to organizations. Personal repositories don’t support them (it’s a platform limitation). The extension detects this up front and exits with a clear error. If GitHub ever extends issue types to personal repos, the extension should pick that up automatically (support is gated on what the API returns, not on a hardcoded org check).