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!
You can use the github api for this. Hitting https://api.github.com/users/USERNAME/repos will list public repositories for the user USERNAME.
You can search for designated private repositories on GitHub Enterprise Cloud from your GitHub Enterprise Server instance.
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 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.
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'
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With