Skip to content

"View file" in PRs should point to the branch, not the commit #2260

Closed

Description

@fregante
  1. Visit https://github.com/sindresorhus/refined-github/pull/2259/files
  2. Click "View file" in the dropdown of any file
  3. You'll be redirected to https://github.com/sindresorhus/refined-github/blob/0ae4f89ff9980db11a0d5d67ebb0b684230a5249/source/options.css

You're viewing a file in a PR on a different fork, but it's still shown as part of the origin repo. This has a big flaw: you can't edit any files from this view, for example if you navigate to its sibling source/options.html file you'll be on page https://github.com/sindresorhus/refined-github/blob/0ae4f89ff9980db11a0d5d67ebb0b684230a5249/source/options.html

How to code this feature

Activity

  1. added
    small
    on Jul 20, 2019
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

    acceptedenhancementsmall

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions