nerdishbynature/octokit.swift

List PRs in Private Repos

iUsmanN opened this issue · 1 comments

Hi,

I can't seem to get the PRs in private repos and get the error:

Error Domain=com.nerdishbynature.octokit Code=404 "(null)" UserInfo={RequestKitErrorKey={ "documentation_url" = "https://docs.github.com/rest/reference/pulls#list-pull-requests"; message = "Not Found"; }}

I've given the repo scope and feel it should be working.

Any help would be appreciated!
Usman

I was able to get this done with the repo scope

image

do {
    let config = TokenConfiguration("your_token")
    let prs = try await Octokit(config).pullRequests(owner: "pietbrauer", repository: "my_private_repo", state: .all)
    print(prs.compactMap { $0.title })
} catch {
    print(error)
}