mona-actions / gh-repo-stats

GH CLI extension to pull statistics on repository metadata used in GitHub migrations
MIT License
146 stars 76 forks source link

Non-existent repo callout and repo-list output for which repo being processed #45

Open esleyshaffer opened 1 year ago

esleyshaffer commented 1 year ago

A couple minor improvement suggestions. Great tooling btw! 🏆

Sample of testing around the issues mentioned. Repo name and org were swapped to generic in the output below.

/github/migration/stats$ cat ./repo-list.txt
ActiveRepo    
NonExistentRepo

/github/migration/stats$ gh repo-stats --org myorg --repo-list ./repo-list.txt                               

######################################################
######################################################
############# GitHub repo list and sizer #############
######################################################
######################################################

User provided a repo list file. Mapping contents...
------------------------------------------------------
Getting repositories for org: myorg
Rate limits remaining: 4978 GraphQL points  4962 REST calls
Rate limits remaining: 4977 GraphQL points  4960 REST calls
Rate limits remaining: 4975 GraphQL points  4958 REST calls
Rate limits remaining: 4974 GraphQL points  4957 REST calls
Gathered all repositories for org: myorg

######################################################
The script has completed

Results file:[myorg-all_repos-202305031643.csv]
######################################################

/github/migration/stats$ cat ./myorg-all_repos-202305031643.csv
Org_Name,Repo_Name,Is_Empty,Last_Push,Last_Update,isFork,Repo_Size(mb),Record_Count,Collaborator_Count,Protected_Branch_Count,PR_Review_Count,Milestone_Count,Issue_Count,PR_Count,PR_Review_Comment_Count,Commit_Comment_Count,Issue_Comment_Count,Issue_Event_Count,Release_Count,Project_Count,Branch_Count,Tag_Count,Discussion_Count,Has_Wiki,Full_URL,Migration_Issue
myorg,activerepo,false,2023-05-03T15:56:07Z,2023-04-27T21:10:23Z,false,56,56,19,2,0,0,2,11,0,0,1,21,0,0,7,0,0,true,https://github.com/myorg/activerepo,FALSE
ANUTA8381 commented 6 months ago

IMG_0912