Skip to main content

github repo management

Project description

Install

$ [sudo] pip install github-repo

Config

$ export GITHUB_TOKEN="xxx"
$ cd path/to/repo
>>> os.environ["GITHUB_TOKEN"]="xxx"
>>> os.chdir("path/to/repo")

Functions

function __doc__
github_repo.create() create github repo
github_repo.fullname() return fullname (owner/repo) string
github_repo.request(method, url, data=None, **kwargs) requests.request
github_repo.description.get() return repo description
github_repo.description.update(description) update repo description
github_repo.homepage.get() return repo homepage
github_repo.homepage.update(url) update repo homepage
github_repo.remote.add(name, url) git remote add name url
github_repo.remote.get() return git remote tuple (name, url)
github_repo.remote.name() return git remote name
github_repo.remote.rm() git remote rm name
github_repo.remote.url() return git remote url
github_repo.topics.add(topics) add topics
github_repo.topics.get() return topics list
github_repo.topics.update(topics) replace all topics

CLI

usage __doc__
python -m github_repo.browse open github repo in browser
python -m github_repo.create create github repo
python -m github_repo.description [description] get/update description
python -m github_repo.fullname print fullname (owner/repo)
python -m github_repo.homepage [url] get/update homepage
python -m github_repo.remote.name print git remote name
python -m github_repo.remote.rm git remote rm name
python -m github_repo.remote.url print git remote url
python -m github_repo.topics.add topic ... add topics to repository
python -m github_repo.topics.get print repository topics
python -m github_repo.topics.rm remove repository topics
python -m github_repo.topics.update topic ... repository topics

Examples

CLI
$ git remote add github git@github.com:owner/repo.git
$ python -m github_repo.remote.name
github
$ python -m github_repo.remote.url
git@github.com:owner/repo.git
$ python -m github_repo.fullname
owner/repo

$ python -m github_repo.remote.rm  # git remote rm github
$ python -m github_repo.description "new description"
$ python -m github_repo.description
new description
$ python -m github_repo.homepage "https://user.github.io/"
$ python -m github_repo.homepage
https://user.github.io/
$ python -m github_repo.topics.add "python" "pypi"
$ python -m github_repo.topics.get
python
pypi
$ python -m github_repo.topics.update "node" "npm"
$ python -m github_repo.topics.rm
Functions
>>> github_repo.remote.add("github","git@github.com:owner/repo.git")
>>> github_repo.remote.get() or (None, None)
('github', 'git@github.com:owner/repo.git')
>>> github_repo.remote.name()
'github'
>>> github_repo.remote.url()
'git@github.com:owner/repo.git'
>>> github_repo.fullname()
'owner/repo'

>>> github_repo.remote.rm()
>>> github_repo.description.update('new description')
>>> github_repo.description.get()
'new description'
>>> github_repo.homepage.update('https://user.github.io/')
>>> github_repo.homepage.get()
'https://user.github.io/'
>>> github_repo.topics.add(['python','pypi'])
>>> github_repo.topics.get()
['python','pypi']
>>> github_repo.topics.replace(['node','npm'])
>>> github_repo.topics.rm()

readme-md - README.md generator

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
github_repo-2018.11.29-py2.py3-none-any.whl (10.0 kB) Copy SHA256 hash SHA256 Wheel py2.py3
github-repo-2018.11.29.tar.gz (4.0 kB) Copy SHA256 hash SHA256 Source None

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page