Skip to content

grizz/ghmeta

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 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

release_notes.py

Script that generates release notes markdown.

Set up

Requirements

export GHMETA_TOKEN=$TOKEN
pipenv install
pipenv run ./release_notes.py -r "peeringdb/peeringdb"

Usage

usage: release_notes.py [-h] --repository REPOSITORY [--milestone MILESTONE]

Extract release notes from Github issues and format into a Markdown table.

optional arguments:
  -h, --help            show this help message and exit
  --repository REPOSITORY, -r REPOSITORY
                        Repository to scan
  --milestone MILESTONE, -m MILESTONE
                        Name of milestone

The milestone name will default to "Next release"

About

GitHub metadata sync

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages