Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG]: Accessing Pull Requests from all GHE Org Repos (internal included) #2897

Open
1 task done
dorf8839 opened this issue Mar 22, 2024 · 0 comments
Open
1 task done
Labels
Status: Up for grabs Issues that are ready to be worked on by anyone Type: Bug Something isn't working as documented

Comments

@dorf8839
Copy link

dorf8839 commented Mar 22, 2024

What happened?

I'm currently able to pull PRs from all public and private repos of my GHE organization but the request for a PR from an internal repo always comes back with a 404 status code. I'm using the PullRequest.Get() method for the request. For my Github App, I'm requesting the following permissions:

  • Metadata: Read-only
  • Pull Requests: Read-only
  • Email addresses: Read-only

I'm generating a token using the ID and Secret from the App, and then use the access token in the Credentials object when creating the client. I've tried specifying different AuthenticationType enum values in the Credentials object as well but without luck. I've also attempted to retrieve all repos from the organization but none of the internal repos are returned.

In the OauthLoginRequest I'm requesting { "read:user", "repo", "pull_requests:read" }. I've tried it both with and without the last scope listed, as I believe that one might be specific to calling the REST endpoints, as well as with no scopes listed.

When I get my OAuthToken from the Oauth.CreateAccessToken() method, the OAuthToken.Scope value is a string array but the only value is an empty string. I'm not sure why that wouldn't be returning the scopes listed in the OauthLoginRequest though.

Any and all help is greatly appreciated. Thank you!

Versions

Octokit v9.1.0

Relevant log output

Octokit.NotFoundException: 'Not Found'

Code of Conduct

  • I agree to follow this project's Code of Conduct
@dorf8839 dorf8839 added Status: Triage This is being looked at and prioritized Type: Bug Something isn't working as documented labels Mar 22, 2024
@kfcampbell kfcampbell added Status: Up for grabs Issues that are ready to be worked on by anyone and removed Status: Triage This is being looked at and prioritized labels Apr 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Up for grabs Issues that are ready to be worked on by anyone Type: Bug Something isn't working as documented
Projects
Status: 🔥 Backlog
Development

No branches or pull requests

2 participants