Skip to content

BUG Language Per Repo title does not match graph. #535

@alyashour

Description

@alyashour

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Run action on an account with repos owned by an organization in a language that outnumbers the top public repos language.
  2. The title will have a language that does not match the top lang.

For example: I have most of my repositories in Python (5). But as a student I have many repositories in JS (10) for assignments owned by my university.

This is what the code produces:

I Mostly Code in JavaScript

Python                   5 repos             ████░░░░░░░░░░░░░░░░░░░░░   14.29 % 
C++                      3 repos             ██░░░░░░░░░░░░░░░░░░░░░░░   08.57 % 
Swift                    2 repos             █░░░░░░░░░░░░░░░░░░░░░░░░   05.71 % 
HCL                      1 repo              █░░░░░░░░░░░░░░░░░░░░░░░░   02.86 % 
Go                       1 repo              █░░░░░░░░░░░░░░░░░░░░░░░░   02.86 % 

Expected behavior
The code should not count org repositories in the title or start counting org repositories in the graph to be consistent.

Example:
I Mostly Code in Python

Python                   5 repos             ████░░░░░░░░░░░░░░░░░░░░░   14.29 % 
C++                      3 repos             ██░░░░░░░░░░░░░░░░░░░░░░░   08.57 % 
Swift                    2 repos             █░░░░░░░░░░░░░░░░░░░░░░░░   05.71 % 
HCL                      1 repo              █░░░░░░░░░░░░░░░░░░░░░░░░   02.86 % 
Go                       1 repo              █░░░░░░░░░░░░░░░░░░░░░░░░   02.86 % 

Note that in this case the percentages are calculated incorrectly as it assumes all repositories as the total (35) instead of just owned repositories (19).

Correct Percentages
I Mostly Code in Python

Python                   5 repos             ████████░░░░░░░░░░░░░░░░░   26.32 % 
C++                      3 repos             ████░░░░░░░░░░░░░░░░░░░░░   15.79 % 
Swift                    2 repos             ███░░░░░░░░░░░░░░░░░░░░░░   10.53 % 
HCL                      1 repo              █░░░░░░░░░░░░░░░░░░░░░░░░   05.26 % 
Go                       1 repo              █░░░░░░░░░░░░░░░░░░░░░░░░   05.26 % 

or

I Mostly Code in JavaScript

Javascript               10 repos            █████████████░░░░░░░░░░░░   45.45 % 
C#                       5 repos             ████░░░░░░░░░░░░░░░░░░░░░   14.29 % 
Python                   5 repos             ████░░░░░░░░░░░░░░░░░░░░░   14.29 % 
C++                      3 repos             ██░░░░░░░░░░░░░░░░░░░░░░░   08.57 % 
Swift                    2 repos             █░░░░░░░░░░░░░░░░░░░░░░░░   05.71 % 
HCL                      1 repo              █░░░░░░░░░░░░░░░░░░░░░░░░   02.86 % 
Go                       1 repo              █░░░░░░░░░░░░░░░░░░░░░░░░   02.86 % 
HTML                     1 repo              █░░░░░░░░░░░░░░░░░░░░░░░░   02.86 % 

Github repository link
My Readme for reference. (https://github.com/alyashour)

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions