RepoSense icon indicating copy to clipboard operation
RepoSense copied to clipboard

Author profile not found in deployed dashboard

Open Tejas2805 opened this issue 3 years ago • 6 comments

The deployed dashboard doesn't show the profile for the author Eugene Peh. It works for all other authors.

The link that should open should be this link instead of the wrong link.

Notice the addition of %20 in the latter URL.

Tejas2805 avatar Mar 18 '21 21:03 Tejas2805

Maybe this particular author can be ignored using the repo-config.json in this case? Not sure about the exact cause but it seems that the Github Id for this particular author generated in the json file is incorrect.

HCY123902 avatar Mar 19 '21 09:03 HCY123902

Referring to: https://api.github.com/repos/reposense/testrepo-Alpha/commits

Seems like backend uses commit.author.name to determine the gitId. This is consistent with the fakeauthor's username which leads to a person who never contributed to reposense.

However it should be using author.login instead.

gerhean avatar Mar 22 '21 13:03 gerhean

After some investigation, I think with the current way RepoSense works, it is impossible to extract out github id if it is different from author name.

Currently the gitId/Author name is sourced from git log command, which provides the author name used when committing. In the the case that the github id is different from the author name (in the case of 'eugenepeh' and 'Eugene Peh' for example) there is simply no information provided by git that allows us to get the correct github id.

A possible solution is to request more information about the commit via the Github API as seen in gerhean's comment:

Referring to: https://api.github.com/repos/reposense/testrepo-Alpha/commits

This will require the need to work with not just Github, but also potentially GitLab's and BitBucket's API. (Another minor caveat is the need to differentiate between committer and author, but this shouldn't be too important.)

Another possibility is to add some sort of configuration file that maps the author names to the correct github API. This configuration file would then need to be set up for each repository that needs to be analyzed as long as there is a difference between the author name and the Github id. While this is certainly cumbersome, I can see some use cases for this.

clyveycui avatar Dec 15 '22 20:12 clyveycui

My understanding is, author-config.csv already provides a way to specify the mapping between a GitHub username and author names in the commits. This specific problem might be due to an error/omission in the author-config.csv.

damithc avatar Dec 16 '22 02:12 damithc

It seems that eugene peh is missing from the author-config.csv, so that's probably the issue.

What about using github api? Is there any form of consideration to move towards that solution?

clyveycui avatar Dec 16 '22 13:12 clyveycui

What about using github api?

@clyveycui we prefer not to rely on the Github API, as it is vendor-specific, requires authentication, has rate limits, etc.

damithc avatar Dec 16 '22 14:12 damithc