1 parent 0f64b16 commit d6e7806Copy full SHA for d6e7806
1 file changed
github2/pull_requests.py
@@ -67,6 +67,10 @@ def create(self, project, base, head, title=None, body=None, issue=None):
67
post_data["title"] = title
68
if body:
69
post_data["body"] = body
70
+ else:
71
+ raise TypeError("You must either specify a title for the "
72
+ "pull request or an issue number to which the "
73
+ "pull request should be attached.")
74
pull_request_data = [("pull[%s]" % k, v) for k, v in post_data.items()]
75
return self.get_value(project, post_data=dict(pull_request_data),
76
filter="pull", datatype=PullRequest)
0 commit comments