Skip to content

create_pull documentation is insufficient and incorrect #259

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
jnothman opened this issue Jun 23, 2014 · 9 comments
Closed

create_pull documentation is insufficient and incorrect #259

jnothman opened this issue Jun 23, 2014 · 9 comments
Labels

Comments

@jnothman
Copy link
Contributor

:param str base: (required), e.g., 'username:branch', or a sha
shows base being username:branch. This is incorrect. create_pull should be called on the base repository (this should be documented), in which case the username (project, really) is predetermined. base should be merely the branch (usually master). head should be username:branch.

@sigmavirus24
Copy link
Owner

Feel free to create a PR

@jnothman
Copy link
Contributor Author

I had considered doing so, but didn't have the time to understand your
testing framework.

On 23 June 2014 22:05, Ian Cordasco notifications@github.com wrote:

Feel free to create a PR


Reply to this email directly or view it on GitHub
#259 (comment)
.

@sigmavirus24
Copy link
Owner

The tests and the docs are separate entities. They do not affect each other. Simply fixing the docs does not require understanding of the tests.

@jnothman
Copy link
Contributor Author

Sure, but the tests are not sufficient. Fine. I'll fix only the docs.

On 24 June 2014 09:15, Ian Cordasco notifications@github.com wrote:

The tests and the docs are separate entities. They do not affect each
other. Simply fixing the docs does not require understanding of the tests.


Reply to this email directly or view it on GitHub
#259 (comment)
.

@jnothman
Copy link
Contributor Author

It would also be nice to make base optional (default='master') but that
requires a parameter reordering.

On 24 June 2014 09:32, Joel Nothman jnothman@student.usyd.edu.au wrote:

Sure, but the tests are not sufficient. Fine. I'll fix only the docs.

On 24 June 2014 09:15, Ian Cordasco notifications@github.com wrote:

The tests and the docs are separate entities. They do not affect each
other. Simply fixing the docs does not require understanding of the tests.


Reply to this email directly or view it on GitHub
#259 (comment)
.

@sigmavirus24
Copy link
Owner

For future readers who find this and realize I never responded to @jnothman's last idea, here's the problem: while most repositories use master as their default branch, there are more than enough that don't to justify this. A good recipe (that should be documented) is r.create_pull_request(title='..', body='...', base=r.default_branch, head='user:branch').

@jnothman
Copy link
Contributor Author

But you could still make base optional to facilitate that case...?

@sigmavirus24
Copy link
Owner

So I try to mirror the GitHub API. If something is required by the API, I require it be provided by the user. That said, I could allow the user to pass None and in that case use self.default_branch. I just don't know how I like that. @esacteksab thoughts?

@esacteksab
Copy link
Contributor

I agree. Github requires it, we should enforce that requirement.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants