Skip to content

peeringdb/ghmeta

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ghmeta.py

A quick script to sync labels and milestones between GitHub repos.

Set up

Requirements

export GHMETA_TOKEN=$TOKEN
pipenv install
pipenv run ./ghmeta.py

Usage

Usage: ghmeta.py [OPTIONS] [COMMAND]

Options:
  --pull-from TEXT  Read metadata from here, default is none meaning local
                    file (`data.yml`).

  --push-to TEXT    Push metadata to these repos (may be a comma separated
                    list

  --help            Show this message and exit.

$REPO_URL is a GitHub user/pass combination, so for example grizz/ghmeta

Default command is display, which will show from the yaml file data.yml by default. The other command is push which will take from the data source and push to one or more GitHub repos.

To create a new data file, you can run ghmeta.py --pull-from=$REPO_URL > data.yml

To push the source to destination repos, you'll need to supply a list of $REPO_URLs to push to using either the command line --push-to=user/repo0,user/repo2 or the data file as:

ghmeta:
  push_to:
  - user/repo0
  - user/repo1

The data file will be made correctly when combining the two commands as such:

ghmeta.py --pull-from=$REPO_URL --push-to=$REPO_URL > data.yml

Or directly sync between a source and one or more repos with:

ghmeta.py --pull-from=$REPO_URL --push-to=$REPO_URL[,$REPO_URL] push`

TODO:

  • add --delete flag
  • add --exclude flag
  • add --overwrite flag

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%