Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gh pr create doesn't allow browser editing after adding metadata #9092

Open
bburgess19 opened this issue May 16, 2024 · 2 comments
Open

gh pr create doesn't allow browser editing after adding metadata #9092

bburgess19 opened this issue May 16, 2024 · 2 comments
Labels
enhancement a request to improve CLI gh-pr relating to the gh pr command

Comments

@bburgess19
Copy link

bburgess19 commented May 16, 2024

Describe the bug

Version v2.49.2

When executing gh pr create and after adding metadata to the PR, the "Continue in browser" option disappears.

Steps to reproduce the behavior

  1. Type gh pr create
  2. Proceed through steps until given the first "What's next?" menu
  3. Select "Add metadata"
  4. Select "Assignees" and add yourself
  5. Click enter and return again to the "What's next?" menu
  6. Bug: "Continue in Browser" is missing

Expected vs actual behavior

I expected to see the "Continue in Browser" option to be available when I returned back to the menu after adding myself as an assignee.

@bburgess19 bburgess19 added the bug Something isn't working label May 16, 2024
@cliAutomation cliAutomation added the needs-triage needs to be reviewed label May 16, 2024
@andyfeller
Copy link
Contributor

@bburgess19 : thanks for opening up this issue! ❤

Have you read through #1575?

This is the issue along with #3271 that limited the "Continue in browser" ability if any PR metadata is set. Users having so much metadata that exceeds HTTP request limit opening the PR UI were understandably upset.

I'm unsure if the GitHub CLI can detect whether the browser request was successful or not in order to fall back to creating the PR as a last ditch effort.

Any suggestion on how to design around this limitation is welcome; otherwise. Or at the least, if having an error message when you arrive to the 2nd prompt menu explaining this option was not presented because the metadata.

@andyfeller andyfeller added enhancement a request to improve CLI gh-pr relating to the gh pr command and removed bug Something isn't working needs-triage needs to be reviewed labels May 16, 2024
@bburgess19
Copy link
Author

@andyfeller thank you for extra resources, and a speedy response!

I was unaware of the limitation due to the HTTP request size limit, so thank you for that context!

As it is, adding metadata and choosing to continue the PR in browser are mutually exclusive actions. My use case for continuing in the browser is always adding images to my PR, a task which is far more temporally costly than clicking a few menu options on the sidebar of the UI.

As such, it would be more effective to, when writing a PR that I know will need images, always choose to continue in browser without concerning myself with adding metadata on the CLI. I am in favor of encouraging that behavior to users: either continue in browser OR add metadata.

Proposed Solution:

  1. Type gh pr create
  2. Continue through steps until "What's next"
  3. User clicks on Add metadata
  4. In yellow font, underneath "What would you like to add?", show text, "Note: adding metadata prevents continuing your pull request in browser"

Note

The case where the user clicks on "Continue in Browser" doesn't matter because they would have left the CLI anyway.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement a request to improve CLI gh-pr relating to the gh pr command
Projects
None yet
Development

No branches or pull requests

3 participants