Skip to content

feat(github): devops gh issues view shows one issue #2361

Description

@dan-petty

Problem or Motivation

An agent or a person can list issues with devops gh issues list, but cannot read one issue. The list cuts each title to 50 characters and shows no body, state or dates. To read an issue, the reader must run bare gh issue view, and AGENTS.md rule 7 forbids bare gh. The devops commands pace each request against the rate limit. devops pr view and devops gh runs view already exist, so issues is the only group of the three that cannot view one item.

Proposed Solution & Architectural Design

Add devops gh issues view <number> to the existing issues group in src/devops_cli/commands/gh.py.

  • Command signature: devops gh issues view <number> [--repo/-R OWNER/REPO]. The number argument is an integer, 1 or more. --repo defaults to this checkout's origin, as for issues list.
  • Request: one GET /repos/{repo}/issues/{number} through get_github_session(). This is the call that _fetch_issues_rest in src/devops_cli/github/issues.py already uses for the list. Add no new HTTP client.
  • Model: parse the answer with the existing _parse_single_issue into the existing GitHubIssue model. That model already holds number, title, body, state, milestone, labels, assignees, dates and URL.
  • Output: print the title, state, URL, milestone, labels, assignees, created and updated dates, and the full body. Do not cut the title or the body.
  • Help text: add HELP.gh.issues_view in src/devops_cli/lang/en/help.py.
  • Docs: run devops docs generate --sync-readme so README.md lists the command.

Error handling:

  • An issue that does not exist (HTTP 404): print an error that names the number and the repository. Exit with a non-zero code.
  • A number that belongs to a pull request: the REST issues endpoint also answers for pull requests, and it marks them with a pull_request key. Print an error that names devops pr view <number>. Exit with a non-zero code.
  • Any other failure: raise the existing GitHubOperationError. Do not swallow it, and do not print an empty issue.

Out of scope: issue comments, timeline events and sub-issue links. File them as separate items if a reader needs them.

Acceptance criteria:

  1. devops gh issues view 9999 -R owner/name prints the full issue when the issue exists.
  2. The command exits non-zero with the number and the repository in the message when the issue does not exist.
  3. The command exits non-zero and names devops pr view when the number is a pull request.
  4. A test for each of the three cases fails before the change and passes after it. The tests stub the GitHub session and make no network request.
  5. README.md and the generated command docs list devops gh issues view.

Naming

The command group is issues, not issue. This item adds view to the group as it is, so the command is devops gh issues view. It adds no second group issue.

Target Subsystem

SDLC, Git & PR Governance

Existing Tool Considered

gh issue view from the GitHub CLI covers the need, but AGENTS.md rule 7 forbids bare gh because it does not pace requests against the rate limit. The change reuses the code the repository already has: the gidgethub-based GitHub session, _parse_single_issue and GitHubIssue. It adds one command function and one help string, and no new dependency. The cost is small because the list command already holds all the parts.

Feasibility

Checked on main at commit 69928b0:

  • uv run devops gh issues --help lists list, create, triage, status and edit. It has no view.
  • uv run devops gh --help has no issue group, only issues.
  • GitHubIssue, _parse_single_issue and get_github_session() exist in src/devops_cli/github/issues.py.
  • GET /repos/{owner}/{repo}/issues/{number} is a documented GitHub REST endpoint.

Activity

  1. added
    source/agent
    type/feature
    on Oct 27, 2026
  2. dan-petty commented on Oct 27, 2026

    @dan-petty
    OwnerAuthor

    Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones on the board.

    • Type: type/feature. The candidate adds a new command devops gh issues view to an existing group.
    • Priority: P3-Low. The data is reachable via bare gh issue view, so this is a convenience gap, not a blocker.
    • Value: Medium. It fills the only missing subcommand in the issues group and removes the need to break the AGENTS.md rule.
    • Effort: Low. The candidate reuses existing parse, model, and session code and adds one function and one help string.
    • Related: feat(gh): devops gh issues close records the close reason and a comment, so a superseded item closes as not planned through rate-managed tooling #1658, which asks for a different change. Both add a subcommand to the devops gh issues group for rate-managed access, but one adds view and the other adds close with a reason.
  3. added a commit that references this issue on Oct 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    source/agenttype/feature

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions