atom-pull-requests icon indicating copy to clipboard operation
atom-pull-requests copied to clipboard

Doesn't work on repos that belong to organizations

Open cbrownrt opened this issue 9 years ago • 8 comments

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>

cbrownrt avatar Jun 10 '16 20:06 cbrownrt

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

hxghhhh avatar Aug 30 '16 20:08 hxghhhh

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)

philschatz avatar Sep 06 '16 16:09 philschatz

Does it work if you have the repo forked?

babineaum avatar Sep 14 '16 23:09 babineaum

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.

zxaos avatar Nov 11 '16 18:11 zxaos

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

manavkataria avatar Jan 05 '17 23:01 manavkataria

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

zxaos avatar Jan 06 '17 21:01 zxaos

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

max-nova avatar Jan 05 '18 20:01 max-nova

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

edobry avatar Mar 08 '19 22:03 edobry