philschatz / atom-pull-requests

:octocat: View/Edit comments on a Pull Request directly inside the Atom Editor
47 stars 9 forks source link

Doesn't work on repos that belong to organizations #16

Open cbrownrt opened 8 years ago

cbrownrt commented 8 years ago

If a repo belongs to an organization instead of a user, the request for the pulls does not work. I am on an enterprise version, as well.

For example:

https://github.company.com/api/v3/repos/<username>/<reponame>/pulls?head=<username>%3A<branchname>

I can make this work from curl by substituting the organization name for the username:

https://github.company.com/api/v3/repos/<orgname>/<reponame>/pulls?head=<orgname>%3A<branchname>
hxghhhh commented 7 years ago

I'm in the same situation, which part of the code would i have to alter to make this work in the package?

philschatz commented 7 years ago

I think the problematic code is around here but I don't recall which request needs to be made to get the proper JSON back from GitHub's API. I can take a look but it may be a few days (if someone wants to explore)

babineaum commented 7 years ago

Does it work if you have the repo forked?

zxaos commented 7 years ago

I took a look at this on the weekend and found that the issue is actually related to the token scope.

If you don't supply the repo scope on the access token, organization private repos don't appear to exist. I changed the scope and it started working immediately.

manavkataria commented 7 years ago

@zxaos should this be marked closed if this is a non-issue?

zxaos commented 7 years ago

@manavkataria PR #22 Should close this issue, IMO - it needs documenting since at least three people ran into it :-)

max-nova commented 6 years ago

I tried adding the repo scope to the access token, but doesn't seem to be working

edobry commented 5 years ago

Same for me, this doesn't work. Added the repo scope and still errors.