Repository navigation
gh project view with web flag does not open interactive mode #8721
Description
Activity
forgot the version
gh --version gh version 2.44.1 (2024-02-16) https://github.com/cli/cli/releases/tag/v2.44.1Hey @harveysanders thanks for the detailed bug report, very useful. I can verify this happens to me.
I can see it being borderline between a missing feature (since the documented example does work) and a bug. In either case I think it's reasonable to expect this to work.
I'm going to label this as
help wantedand would love to receive a PR from you. I haven't confirmed but seems like we'd need to move this conditional below theNewOwnerandNewProjectwhich do the prompting, and to add some tests that ensure this works inTTYmode and respond to the prompts correctly:cli/pkg/cmd/project/view/view.go
Lines 85 to 95 in fcb1576
if config.opts.web { url, err := buildURL(config) if err != nil { return err } if err := config.URLOpener(url); err != nil { return err } return nil } - addedpriority-3Affects a small number of users or is largely cosmeticAffects a small number of users or is largely cosmeticgh-projectrelating to the gh project commandrelating to the gh project commandenhancementa request to improve CLIa request to improve CLIand removedneeds-triageneeds to be reviewedneeds to be reviewedbugSomething isn't workingSomething isn't workingpriority-3Affects a small number of users or is largely cosmeticAffects a small number of users or is largely cosmetic
on Feb 20, 2024 @williammartin sounds good! Thanks for the pointers. I'm not sure when I'll be able to get to it, but I'd be happy to put something together.

I'm not sure if this is a bug or a not-yet-implemented feature.
gh project viewwithwebflag does not open interactive modeDescribe the bug
gh project viewwithwebflag does not open interactive mode, instead opens the browser with a project URL missing with zero values for organization and project number.Steps to reproduce the behavior
Opens the browser with the URL:
Expected vs actual behavior
Based on how the
projectcommand works without the--webflag, I would expect the command to start interactive mode and prompt me to select a project. Instead, it opens the browser with a URL that is missing the organization and project number.Many of the other commands start interactive mode when the
--weband no other arguments are provided. For example,gh run view --webstarts interactive mode and prompts me to select a run.Ex. running the
viewcommand in thiscli/clirepo:Given this behavior on some of the other commands, I expected the same behavior for
project.Anyway, thanks for building this great tool. I use it nearly every day. I'd be happy to submit a PR in time if this is not a high-priority issue.