Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get github issues(tickets) from terminal?

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!

like image 406
erosespinola Avatar asked Oct 15 '25 10:10

erosespinola


2 Answers

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.

like image 115
poke Avatar answered Oct 17 '25 05:10

poke


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.

like image 33
Simon Avatar answered Oct 17 '25 03:10

Simon