Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion 6 github2/pull_requests.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def create(self, project, base, head, title=None, body=None, issue=None):
issue. If an ``issue`` parameter is supplied the pull request is
attached to that issue, else a new pull request is created.

:param str project: Github project
:param str project: the Github project to send the pull request to
:param str base: branch changes should be pulled into
:param str head: branch of the changes to be pulled
:param str title: title for pull request
Expand All @@ -67,6 +67,10 @@ def create(self, project, base, head, title=None, body=None, issue=None):
post_data["title"] = title
if body:
post_data["body"] = body
else:
raise TypeError("You must either specify a title for the "
"pull request or an issue number to which the "
"pull request should be attached.")
pull_request_data = [("pull[%s]" % k, v) for k, v in post_data.items()]
return self.get_value(project, post_data=dict(pull_request_data),
filter="pull", datatype=PullRequest)
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.