Skip to content

GitHub Enterprise server can generate a CSV of all repositories, but it is missing the topics of those repos. This tool helps with that.

License

Notifications You must be signed in to change notification settings

Sam-Rowe/All-Repositories-With-Topics

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

All-Repositories-With-Topics

GitHub Enterprise server can generate a CSV of all repositories, but it is missing the topics of those repos. This tool helps with that.

Purpose

The All Repositories report is a CSV like this

created_at,owner_id,owner_type,owner_name,id,name,visibility,readable_size,raw_size,collaborators,fork?,deleted?
2023-02-01 15:48:05 +0000,5,Organization,Org1,5,repo5,private,0 Bytes,0,0,false,false

but what if you want the topics as well for each of those repos?

created_at,owner_id,owner_type,owner_name,id,name,visibility,readable_size,raw_size,collaborators,fork?,deleted?,topics
2023-02-01 15:49:55 +0000,5,Organization,Org1,5,repo5,private,0 Bytes,0,0,false,false,"classified,duplicate,emea,support"

Usage

Install cli tool

npm install

Setup Environment vairables

Goto your user settings

image

Open Developer settings at the bottom of the blade

image

Then Personal access tokens

image

Generate a new token with the following permission

image

Then use the domain of your GHES (yeah I know badly named, I would love to review a pull request to fix this) to put into the GHES_URL And use the PAT (Personal access token) as the GHES_TOKEN. For reference the commands look a bit like this, but remember to change the values.

export GHES_URL="sams-test-ghes.deneb.com"
export GHES_TOKEN="gh_tokengoeshere"

Get the All Repositories report

This is generated in Stafftools on GitHub Enterprise server and looks something like this - image

Run

Copy the all-repositories report into the root of this repo and run the node app

node index.js all-repositories-reportnumber.csv all-repositories-with-topics.csv

About

GitHub Enterprise server can generate a CSV of all repositories, but it is missing the topics of those repos. This tool helps with that.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published