Adds patch method as well.
Add support for indicating an `assignee` on pull requests.
Adds `patch` method
I'm not a ruby developer: would appreciate guidance on augmenting the test suite.
It's a good start. With the test suite, first ensure you can run rake features and that they pass for you. You can run a single file with cucumber features/pull_request.feature. You should add new scenarios to that file.
The tests never connect to the real GitHub API. Instead, they connect to what they think is a GitHub API, but in fact it's a mini-server that implements only the parts of GH API that the current command need. It will look like this:
Given the GitHub API server:
assert :title => 'This title comes from vim!',
:body => 'This body as well.'
json :html_url => "https://github.com/mislav/coral/pull/12"
This fake GitHub API server implements only one API endpoint: POST /repos/mislav/coral/pulls, verifies that it was given correct parameters (title and body) and returns a JSON representation of the pull request like a real GitHub server would. Since hub for now only reads the "html_url" part of the JSON representation, we only return that in tests since we keep it minimal.
For your feature, you'll have to create a new scenario where the --asignee option was used and thus implement another API endpoint: PATCH /repos/mislav/coral/pulls/XYZ. Let me know if you have any troubles.
Thanks, this is a great explanation. I'll update this week.
You might draw some inspiration from the existing pull-request tests, like this one.
@frankshearar Those are old-style tests which I don't maintain anymore since they used too much stubbing. I ported most of them to features/ directory and new contributions shouldn't add tests to test/ directory.
Closing this PR as it won't apply anymore since we nuked the Ruby implementation and replaced it with Go: #642. Sorry that this hasn't made it in.