sindresorhus/refined-github

`fix-view-file-link-in-pr` breaks links to deleted files #3108

fregante posted onGitHub

fix-view-file-link-in-pr makes it easier to edit files after you click "View file", but this doesn't make sense for deleted files: there's no file to delete anymore.

By default, GitHub links to the previous version of the file, before its deletion.

For this reason, deleted files should not be affected by fix-view-file-link-in-pr

Example: https://github.com/yakov116/TestR/pull/21/files It normally links to: https://github.com/yakov116/TestR/blob/7f9a18b4d0f3b8627180a7cbea6513d72d85cfb0/sub/README.md But it's changed to: https://github.com/yakov116/TestR/blob/yakov116-patch-4/sub/README.md (404)


Note: this feature only affects open PRs

posted by fregante almost 5 years ago

I broke the entire feature, never mind deleted files. It need to link to the head repo not base.

Will send a PR soon

posted by yakov116 almost 5 years ago

Fund this Issue

$0.00
Funded

Pull requests