# Gh Assign Issues

Use to assign GitHub issues to a milestone and/or owners in bulk, verifying each.

- Repository: https://github.com/codewhale-hq/Codewhale (41164 stars)
- Category: Git and review
- License: MIT
- Last updated: 2026-11-01
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add codewhale-hq/Codewhale --skill gh-assign-issues -g -a claude-code -y`
Codex: `npx skills add codewhale-hq/Codewhale --skill gh-assign-issues -g -a codex -y`
Cursor: `npx skills add codewhale-hq/Codewhale --skill gh-assign-issues -g -a cursor -y`
Gemini CLI: `npx skills add codewhale-hq/Codewhale --skill gh-assign-issues -g -a gemini-cli -y`

## Description

Use to assign GitHub issues to a milestone and/or owners in bulk, verifying each.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# gh-assign-issues

Retarget or assign a set of Codewhale issues to a milestone and/or owners in
bulk, verifying every one. The milestone (or assignee) change is the signal;
do not narrate it with comments. Use `gh` for all GitHub
calls.

## When to use

- You have a concrete list of issue numbers (e.g. from triage) to move into a
  release milestone such as the current `vX.Y.Z`, or to assign to owners.
- A milestone was renamed/created and its issues need re-pointing.
- You finished grouping the inbox and want the queue to reflect it without
  posting public chatter.

This skill changes milestone/assignee only. It does not close, label, comment,
merge, or release. Those stay with the maintainer.

## Workflow

1. Confirm the exact milestone title. `gh issue edit --milestone` matches by
   name, so a typo silently fails (or worse, no-ops). Read the real titles and
   note the starting open-count:

   ```bash
   gh api repos/codewhale-hq/CodeWhale/milestones \
     --jq '.[] | "\(.number)\t\(.title)\topen=\(.open_issues)\tstate=\(.state)"'
   ```

   Copy the title string verbatim (e.g. the live `vX.Y.Z` title). If the target
   milestone is missing or closed, stop and ask the maintainer; do not create one.

2. Pre-flight each number. `gh issue edit` will happily retarget a PR or a
   closed issue, so screen first. The `url` reveals PR-vs-issue (`/pull/` vs
   `/issues/`); skip anything not OPEN or that is a PR:

   ```bash
   for N in <N1> <N2> <N3>; do   # substitute the real issue numbers
     gh issue view "$N" --repo codewhale-hq/CodeWhale \
       --json number,state,url,milestone \
       --jq '"\(.number)\t\(.state)\t\(.url)\tmilestone=\(.milestone.title // "none")"'
   done
   ```

   Flag any row whose `url` contains `/pull/` (it is a PR) or whose state is
   not `OPEN`, and exclude it from the loop below.

3. Apply the change, one issue at a time, reporting per-issue success. Use
   `--milestone`, `--add-assignee`, or both:

The rest: https://github.com/codewhale-hq/Codewhale/blob/HEAD/docs/skills/gh-assign-issues/SKILL.md
