Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

gh stack checkout only works for formal stacks

Open
#515 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
68/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
github, go
Domain
cli

Research direction

Start at the gh stack checkout command and trace how it determines whether PR #12345 belongs to a formal stack, then inspect how gh pr checkout handles ordinary pull requests. Done means gh stack checkout falls back to the ordinary checkout behavior for a PR that is not in a stack, with the expected notice shown.

Written by the indexing model from the issue text.

Description

Summary

It seems GitHub, and by consequent the gh and gh stack CLI behaviors, have two different mental models for what a "PR" is: one must now use gh pr checkout 12345 if it is a normal PR and gh stack checkout 12345 if it is part of a GH Stack

Then gh stack checkout does not simply fall back to the gh pr checkout behavior if the given PR number is not part of a formal stack

That places the burden upon any automation, or reviewers, to have an if statement which either looks up the condition of the PR or does an actual if ! gh stack checkout $num; then gh pr checkout $num; fi work-around

Expected Behavior

$ gh stack checkout 12345
✗ PR #12345 is not part of a stack on GitHub, using $(gh pr checkout) instead
remote: Enumerating objects: 11, done.
...etc
Dominant language
Go
Stars
1.5k
Forks
73
Avg merge
1d 8h
Merged PRs (30d)
7

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from github/gh-stack

All issues in github/gh-stack

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.