Skip to content

gh pr create should push branch to fork even if I happen to have write permission #392

Description

@jglick

Describe the bug

I have write permission on a repository, but policy is for all PRs to be filed from forks, even when authored by maintainers. gh pr create -w quietly pushed my branch to the origin repository.

gh version 0.5.4

Steps to reproduce the behavior

Fork a repository you have write permission to and file a PR on it using the tool.

Expected vs actual behavior

Expected: my fork used. Actual: pushed to origin and PR filed from there.

Logs

N/A

Activity

  1. electrum commented on Feb 13, 2020

    @electrum

    The behavior is even worse. Simply running gh pr create will push a branch to the upstream repository and then prompt for PR information (such as title). The branch is left behind if PR creation is aborted by pressing ctrl-C.

  2. mislav commented on Feb 17, 2020

    @mislav
    Contributor

    Thank you for reporting! Closing in favor of #350

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