pull-requests - raise TypeError and better docs#57
pull-requests - raise TypeError and better docs#57iartarisi wants to merge 2 commits intoask:masterfrom
Conversation
|
You're absolutely right, we could definitely do with more examples. I'm not at a machine to merge this right now, but I'll get to it ASAP. The reason I'm not hitting The Big Green Button on the web UI is that the commit messages need some work before merging. 0f64b16 isn't very clear and the d6e7806 commit message is too long. Feel free to And, please open as many issues as you want about topics you struggle to understand from the docs. It is a weak excuse, but it is very easy to miss important points for new users when you're knee deep in the project. Thanks, James |
|
Out of curiosity, would it have helped had there been a direct link to the official pull request docs? I had held off on adding them because there are no section level anchors, but perhaps it is better than nothing. |
|
For some reason I was looking at this doc page instead which lacks the curl call and the example. It doesn't help that much however, because it doesn't say anything about the 'project' parameter which seems to be specific to python-github2. To me it seemed obvious that the project should be my fork, instead of the original project where I was requesting the pull. So my call ended up looking like this: gh.pull_requests.create('me:project', 'original_author:master', 'master', 'title'). The funny thing is that that call actually works, but generates a really strange result from the github API. Thanks a lot, |
|
Thanks for the full description, @mapleoin. It is truly appreciated.
I can see this becoming a common problem now v3 is released, I'm going to add a few more API v2 links to the docs.
True, although it is uniform throughout this package. Not sure how to improve the "discoverability" of that, but I'm open to suggestions.
I'm going to add a few examples today to hopefully clear this up, and I've merged your doc changes now which are a great start! |
|
If you have a spare minute: would this have been clear enough? |
|
Thanks a lot! The documentation that you added for pull requests is great! |
I spent a good amount of time trying to figure out the proper way to call the PullRequests.create method. I'm raising a TypeError because if the user doesn't specify a title, a NoneType error will be raised later.
Maybe it would be a good idea to also write an example of the call with the format for the project name. For now I've just tried to make it more obvious which project the 'project' parameter refers to.