-
Notifications
You must be signed in to change notification settings - Fork 737
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix
GHFileNotFoundException
when getting commits from PR found in s…
…earch (#1779) * Replace /issues/ with /pulls/ in sourced URL for Pull Requests. Previously, when a pull request had been fetched, it lacked an `owner`, and thus was following a specific codepath inside `GHPullRequest.GetApiRoute` that was returning a URL that corresponded to an `issue`. When that URL was then appended on for further queries, say, with `/commits`, then Github would return a 404. This fixes the issue by manipulating the URL manually and replacing the wrong reference to `/issues/` with `/pulls/`. * Add test for issue with List of Commits returning 404. --------- Co-authored-by: Liam Newman <[email protected]>
- Loading branch information
1 parent
5b30e46
commit be00e51
Showing
42 changed files
with
34,669 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 34 additions & 0 deletions
34
...ources/org/kohsuke/github/GHPullRequestTest/wiremock/getListOfCommits/__files/1-user.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
{ | ||
"login": "NlightNFotis", | ||
"id": 1859274, | ||
"node_id": "MDQ6VXNlcjE4NTkyNzQ=", | ||
"avatar_url": "https://avatars.githubusercontent.com/u/1859274?v=4", | ||
"gravatar_id": "", | ||
"url": "https://api.github.com/users/NlightNFotis", | ||
"html_url": "https://github.com/NlightNFotis", | ||
"followers_url": "https://api.github.com/users/NlightNFotis/followers", | ||
"following_url": "https://api.github.com/users/NlightNFotis/following{/other_user}", | ||
"gists_url": "https://api.github.com/users/NlightNFotis/gists{/gist_id}", | ||
"starred_url": "https://api.github.com/users/NlightNFotis/starred{/owner}{/repo}", | ||
"subscriptions_url": "https://api.github.com/users/NlightNFotis/subscriptions", | ||
"organizations_url": "https://api.github.com/users/NlightNFotis/orgs", | ||
"repos_url": "https://api.github.com/users/NlightNFotis/repos", | ||
"events_url": "https://api.github.com/users/NlightNFotis/events{/privacy}", | ||
"received_events_url": "https://api.github.com/users/NlightNFotis/received_events", | ||
"type": "User", | ||
"site_admin": false, | ||
"name": "Fotis Koutoulakis", | ||
"company": "@diffblue ", | ||
"blog": "https://nlightnfotis.github.io", | ||
"location": "Oxford, United Kingdom", | ||
"email": "[email protected]", | ||
"hireable": null, | ||
"bio": "Interests in Mathematics, Computer Science, Biology and Economics.", | ||
"twitter_username": "NlightNFotis", | ||
"public_repos": 27, | ||
"public_gists": 8, | ||
"followers": 38, | ||
"following": 51, | ||
"created_at": "2012-06-17T17:34:11Z", | ||
"updated_at": "2023-09-18T09:30:51Z" | ||
} |
Oops, something went wrong.