Github回购管理

github-repo的Python项目详细描述


安装

$ [sudo] pip install github-repo

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

函数

function^{}
^{}create github repo
^{}return fullname (owner/repo) string
^{}requests.request
^{}return repo description
^{}update repo description
^{}return repo homepage
^{}update repo homepage
^{}^{}
^{}return git remote tuple (name, url)
^{}return git remote name
^{}^{}
^{}return git remote url
^{}add topics
^{}return topics list
^{}replace all topics

CLI

usage^{}
^{}open github repo in browser
^{}create github repo
^{}get/update description
^{}print fullname (owner/repo)
^{}get/update homepage
^{}print git remote name
^{}^{}
^{}print git remote url
^{}add topics to repository
^{}print repository topics
^{}remove repository topics
^{}repository topics

示例

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
功能
>>>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生成器

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
如果打开许多Java线程,它们在Android中似乎被卡住了   尝试保存嵌套片段的状态时出现java异常[对于键安卓:target\u state,片段不再存在]   我应该使用什么API或框架在Java中实现这个消息传递系统?   java JPA和序列化行为   使用Java Spring i18n翻译长文本的最佳实践   与字符串÷x%匹配的java正则表达式   春季冬眠   java使用ArrayList在ListView中出错   java解析bufferedReader数据,在某些字符处停止   我尝试在字符串中计数字符(java),但我的解决方案不起作用   java无法为本地开发在Google App Engine上设置默认的App Identity服务帐户   在Java Swing游戏中重置倒计时计时器不工作+JDialog/JOptionPane   Maven找不到intern java文件的符号错误   java获取XML包中返回的SQLException消息?   java Datanucleus类型转换插件   java bouncycastle PKCS12密钥库“最大密码长度”   java使用“==”语句   java在一个数组中包含多个变量?   java获取HttpResponseCode=400和HttpOperationFailedException