sindresorhus/refined-github

Do you want to work on this issue?

You can request for a bounty in order to promote it!

`deep-blame` doesn't support renamed files #2949

fregante posted onGitHub

Feature: https://github.com/sindresorhus/refined-github/pull/2881

  1. Visit https://github.com/sindresorhus/refined-github/blame/fad67fb8d8fcf608601c9b8ae1b5f12337cbccce/source/options.html#L1
  2. Click Deep Blame button
  3. See 404 page

The file is currently source/options.html but was renamed twice.

The link we generate should point to the file that existed at the time: extension/options/index.html

The regular blame follows renames, but I'm not sure we (deep-blame) can.


@fregante I'll look into it tomorrow

posted by yakov116 about 5 years ago

@fregante looked into it. I dont see a way

posted by yakov116 about 5 years ago

Yeah when we implemented the “follow renames” feature we had to pull the rename commit specifically and get the new name from there.

Here we don’t know that commit at all, and even then there may be more than one.

One thing we can do to avoid opening a 404 page is to check the filenames in the PR first. If !associatedPr.fileList.includes(currentFile), alert(file was renamed)

posted by fregante about 5 years ago

Hmm, That would not work if the PR had more than 100 files No?

posted by yakov116 about 5 years ago

Fund this Issue

$0.00
Funded
Only logged in users can fund an issue

Pull requests