Skip to content

gh stack checkout only works for formal stacks #515

Description

@mdaniel

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

Activity

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions