From 0e09983dca42468f87358a20af11f149fe34e49a Mon Sep 17 00:00:00 2001 From: Steve Kowalik Date: Sun, 19 Jan 2020 14:31:58 +1000 Subject: [PATCH] Repository.create_project() body is optional (#1359) The POST parameters passed to the create_project API call did not consider the body optional, and always included it. Fix up a formatting error in the docstring for good measure. Fixes #1357 --- github/Repository.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/github/Repository.py b/github/Repository.py index c1d1e466..a08be2d7 100644 --- a/github/Repository.py +++ b/github/Repository.py @@ -1262,15 +1262,15 @@ class Repository(github.GithubObject.CompletableGithubObject): def create_project(self, name, body=github.GithubObject.NotSet): """ - calls: `POST /repos/:owner/:repo/projects `_ + :calls: `POST /repos/:owner/:repo/projects `_ :param name: string :param body: string + :rtype: :class:`github.Project.Project` """ assert isinstance(name, str), name assert body is github.GithubObject.NotSet or isinstance(body, str), body post_parameters = { "name": name, - "body": body, } import_header = {"Accept": Consts.mediaTypeProjectsPreview} if body is not github.GithubObject.NotSet: