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第三方库


热门话题
springmvc web应用程序中的java导航出错/无效   java是一种JTable,其中每行中的列数可能不同   java哈希表不递减   在Java中使用Path和Path   java如何让服务知道应用程序何时被终止以清除通知?   java为什么sqlite看起来无法在设备中运行?   java Maven jetty插件和资源目录   java将负秒转换为小时:分钟:秒   java简单的安卓和ASP。净组合   java程序编译得非常好,但在运行其drop时,字符串输入会出错   java无状态AjaxFallbackButton?   Java字符串UTF和字节表示   无法从静态上下文引用java Gson非静态变量   java从网站中提取信息   java将派生对象引用分配给基类的变量将不起作用   java CXF自动生成失败   内存如何避免在Java中产生垃圾?   java Jersey:重定向到Jersey根目录之外   java Firestore遍历文档以查找空字段   java中ReadLock的并发检查副本