How to get github issues(tickets) from terminal?

折月煮酒 提交于 2019-12-24 05:18:05

问题


There is a way to get all the issues from a git repository? I need to populate a mysql database with the issues of a specific project with the issues status, reporter, priority, etc... Thanks!


回答1:


Git and GitHub are two different things. The former is a version control system which does not know anything about “issues” or “tickets”, while the latter is a project platform with source hosting and issue management. So the GitHub issues are very specific to GitHub. No Git command will be able to give you GitHub issues.

There is hub (repository), a wrapper around Git, which adds a few GitHub specific functionalities, like interacting with pull requests from the command line. For all browsing-related tasks it refers to the web browser though. And that’s also GitHub’s primary interface.

There does exist an API for issues though, so you could utilize that. There is ghi which utilizes the API and does offer you access to GitHub issues from the command line.




回答2:


Try ghi, here's what it does:

By default, ghi looks for GitHub issues by resolving the current working directory's repository: first it looks for an upstream remote, then it looks at origin.

Gives you a nice list of issues, a detail view, close/edit/assign features etc. I'm never leaving the terminal again.




回答3:


Github provides a web api for their ticket system. It is documented here and you can write a small program to fetch them and look through them.



来源:https://stackoverflow.com/questions/17092863/how-to-get-github-issuestickets-from-terminal

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!