ljharb / repo-report

CLI to list all repos a user has access to, and report on their configuration in aggregate.
MIT License
24 stars 11 forks source link

Display percentages for the statistics #14

Closed sladyn98 closed 2 years ago

sladyn98 commented 3 years ago

It would be great to have percentages for the statistics

eg: 90% branches are named main

Needs more thought on better User Interface

ljharb commented 3 years ago

Percentages, and/or raw numbers, are helpful. I'm not sure what would be the best visualization.

Perhaps (#13) config overrides could supply a short message explaining why the default is overridden, and the output could display that?

CapriciousRebel commented 2 years ago

Hello @ljharb I would like to take this issue up and begin contributing as a part of my MLH fellowship program, could you walk me through any necessary info that I might need?

ljharb commented 2 years ago

@CapriciousRebel great! All of the info should already be available - the program knows how many repos there are, and how many are "good" for a given metric (or collapsed set of metrics). My thinking was that the column headers could add a new line under the metrics with 3/10 (30%) or something?

CapriciousRebel commented 2 years ago

Sounds good, I've assigned this to myself and will begin work!

CapriciousRebel commented 2 years ago

Hey @ljharb so I tried to understand this issue over the weekend, but couldn't understand exactly where these percentages are to be displayed? Also, I am unsure about what do you mean with a column header in this project. So far I have only executed ./bin/run but without any custom config, just the default configs. Perhaps you could provide me with screenshots of where these percentages are needed, or we could speak over the call in our next meeting

CapriciousRebel commented 2 years ago

I did find the good metrics function : https://github.com/ljharb/repo-report/blob/cd56a3926cd5fbdb1b5c7321d981b17ba5884149/src/utils.js#L180 and the function to get current metrics: https://github.com/ljharb/repo-report/blob/cd56a3926cd5fbdb1b5c7321d981b17ba5884149/src/utils.js#L67 to extract the needed percentages, but I am unable to understand where to display

ljharb commented 2 years ago

Here's a screenshot:

Screen Shot 2021-10-11 at 11 06 13 AM

By "headers" i mean the first row, that includes metric names ("Repository", etc).

CapriciousRebel commented 2 years ago

So just to confirm, say, I want to show the percentage of 'good' repos, I'd add another row under the headers and show something like 5/8 there.

ljharb commented 2 years ago

yep! i'd imagine something like 62% (5/8)

CapriciousRebel commented 2 years ago

sounds great!