Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

List all issues from an organization's private repo using github api v3

Tags:

I'm trying to retrieve all issues from an org's private repo but not having much luck.

I'm using a ruby gem "github_api" but I've also tried just trying to access it using curl

So far I'm able to retrieve all issues that I'm assigned or that I'm subscribed but not all issues that exist for that particular repo.

Using the github_api gem (https://github.com/peter-murach/github), I've gotten this far

@github.issues.issues(:filter => "subscribed")

FYI: I'm the owner of the org and repo

Looking at the github api (issues) there doesn't appear to be a filter that will return what I need.

Is this even possible?

Thanks!

like image 406
lsaffie Avatar asked Mar 18 '12 01:03

lsaffie


People also ask

How do I retrieve all GitHub repositories of an organization?

You can use the github api for this. Hitting https://api.github.com/users/USERNAME/repos will list public repositories for the user USERNAME.

Can you search for private repository GitHub?

You can search for designated private repositories on GitHub Enterprise Cloud from your GitHub Enterprise Server instance.

Are GitHub private repos really private?

Privacy and data sharingPrivate repository data is scanned by machine and never read by GitHub staff. Human eyes will never see the contents of your private repositories, except as described in our Terms of Service.

How do I list a repository on GitHub?

How To List All Public Repositories Belonging to a User? So, to list all public repos from a user, send a GET request to https://api.github.com/users/<USER-NAME>/repos , replacing with the actual user from whom you want to retrieve the repositories.


1 Answers

This solution was provided by Luis S, but he couldn't answer his own question because of not enough reputation. Moved it out out of his question for the sake of clarity. If you up-vote this answer don't forget to upvote his question :)


just found the solution. when dealing with organizations. The organization is the actual github user.

So in case of the url:

https://api.github.com/repos/:user/:repo/issues

replace :user by the org name and :repo by the repo name

As far as the github_api gem, use the organization name as the user

@github = Github.new :basic_auth => 'user:pass',
:org => 'org_name',
:user => 'org_name',
:repo => 'repo_name'
like image 162
fresskoma Avatar answered Oct 21 '22 03:10

fresskoma