Bug 479032 - PullRequestService#getPullRequest returns 404
Summary: PullRequestService#getPullRequest returns 404
Status: NEW
Alias: None
Product: EGit
Classification: Technology
Component: Core (show other bugs)
Version: unspecified   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-10-05 07:58 EDT by Maxim Podkolzine CLA
Modified: 2015-10-05 08:30 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Maxim Podkolzine CLA 2015-10-05 07:58:01 EDT
Getting a pull request by id always return 404, but can be found using PullRequestService#getPullRequests().

On top of that PullRequestService#isMerged(repository, id) method works.
Comment 1 Maxim Podkolzine CLA 2015-10-05 08:02:45 EDT
PullRequestService#merge() throws 404 as well
Comment 2 Maxim Podkolzine CLA 2015-10-05 08:12:12 EDT
After making a couple of GitHub requests I figured it out.
The doc states the parameter of PullRequestService#getPullRequest() is `id`, while should be `number`. Pull request id is a different notion and should not be confused with the number.
Comment 3 Maxim Podkolzine CLA 2015-10-05 08:30:12 EDT
One more API issue, which may probably be addressed to GitHub itself, but is present in EGit.
PullRequestService#getPullRequests() can incorrectly determine the merged flag. The reason is that JSON does not include `merged` attribute, but includes `merged at`!