sindresorhus/refined-github

Show lines changed for current commit #2326

dorian-marchal posted onGitHub

When I'm on a specific commit of a pull request, I'd like to see the number of lines changed in this commit, only.

Currently, the total number of lines changed in the whole pull request is shown: Screenshot from 2019-08-13 09-52-59

Example URL: sindresorhus/refined-github#2182/commits/7e8bb264c

This number of lines changed could also appear on the commit page (outside of the pull request).


Yeah, makes sense. I'm surprised GitHub doesn't already do this.


For anyone that wants this, please also send this feature request to GitHub: support@github.com

posted by sindresorhus over 5 years ago

This one should be relatively simple, the data is available on the commit API. However I'm not sure of the logic used to fill those green blocks.

posted by fregante over 5 years ago

@fregante I looked into it. Adding in the blocks I think is something beyond the extention. We would have to figure out the pattern github uses.

I have another issue, not really related to this feature per say. We added the tag feature, merge commits, now we want to add this one.

For each feature we are make a new request for the same commit. Is there any way we can combine the api requests. For 2 reasons:

  1. For a list of 50 commits, it's 150 requests (if not more)
  2. There is no need to wait for 3 requests when it's all waiting for the same info.

Should I open a new issue?

posted by yakov116 about 5 years ago

This feature request is about showing this info on the isCommit and isPRCommit pages, not isCommitList. The features you mention don’t have any overlap

posted by fregante about 5 years ago

~~I'm lost... doesn't github show the amount on the commit??

Can you attach a picture of where your expecting to see it? ~~

OK now I understand. Should I close my pr? Or keep what I did and add on?

posted by yakov116 about 5 years ago

What you do with the PR specifically is up to you, as long as the final feature only includes this information on isCommit and not on the lists.

posted by fregante about 5 years ago

Ok I rewrote most of the code (Did not push yet)

We want to replace GitHub's header or add a new one?

posted by yakov116 about 5 years ago

Fund this Issue

$0.00
Funded

Pull requests