Skip to content

Open the Web Browser with the PR set to Draft gh pr create --web --draft #11112

Open

Description

@rtalexk

Describe the feature or problem you’d like to solve

It'd be useful to open the web browser with submit button set to "Draft pull request".

A clear and concise description of what the feature or problem is.

Currently mixing these two flags is not supported:

gh pr create -wd
the `--draft` flag is not supported with `--web`

This is different than #1646 and #1646 because both propose first creating the PR in draft mode, then opening it in the web browser.

Proposed solution

Allowing to mix --web and --draft pre-select the submit button to be "Draft pull request"

How will it benefit CLI and its users?

Combining flags with the --web one allows to pre-set some defaults, then anyone can change whatever they want in the browser, i.e:

# Open the browser with WIP label added
gh pr create -w -l WIP

But this is not the case for --draft.

Activity

  1. added
    enhancement
    on Jun 13, 2025
  2. added
    needs-triage
    on Jun 13, 2025
  3. williammartin commented on Jun 16, 2025

    @williammartin
    Member

    Hye @rtalexk,

    Unfortunately, there is no query parameter that supports this right now: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/using-query-parameters-to-create-a-pull-request

    I've opened an issue with the team that owns pull requests but I have no idea if or when they would prioritise it.

  4. added
    platform
    gh-pr
    and removed
    needs-triage
    on Jun 16, 2025
  5. johnu21 commented on Jun 29, 2025

    @johnu21
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

    blockedenhancementgh-prplatform

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions