Skip to content

gh variable list --json numSelectedRepos provides different results depending on TTY or not #9255

Description

@williammartin

Describe the bug

I think this is the same bug as #8679

The TL;DR is that gh variable list does not correctly handle --json numSelectedRepos when in a non-interactive session. This is because we only fetch the selected repos if we're hooked up to TTY which was correct when the command was introduced but not when --json became supported

Steps to reproduce the behavior

  1. Create an organization secret
  2. Set it's visibility to "Selected" and choose a repo
  3. Run gh variable list -o <org> --json numSelectedRepos and see the value = 1
  4. Run gh variable list -o <org> --json numSelectedRepos | cat and see the value = 1

Activity

  1. added
    priority-3Affects a small number of users or is largely cosmetic
    coreThis issue is not accepting PRs from outside contributors
    on Jun 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingcoreThis issue is not accepting PRs from outside contributorsgh-variablerelating to the gh variable commandpriority-3Affects a small number of users or is largely cosmetic

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions