github issue工具pygithub
Whisper Lv4

查看【文档】【Github】了解基础使用方法

安装

1
pip install pygithub

最小的例子

1
2
3
4
5
6
7
from github import Github

g = Github("your name", "your password")

repo = g.get_repo(":owner/:reponame") # eg:"hrmes/mercku_issues"
print(repo.name)
repo.create_issue(title="This is a new issue")

获取Labels的名称
找到labels管理页面,点击编辑可以查看到当前label的字符串

获取Milestone添加issue

1
2
3
>>> repo = g.get_repo('PyGithub/PyGithub')
>>> repo.get_milestone(number=1)
Milestone(number=1)