diff --git a/README.rst b/README.rst index 7a33e432..80ede3e9 100644 --- a/README.rst +++ b/README.rst @@ -17,7 +17,7 @@ What's new? Version 1.25.2 (October 7th, 2014) ---------------------------------- -* `Work around `__ the API v3 returning `null`s in some paginated responses, `erichaase `__ for the bug report +* `Work around `__ the API v3 returning ``null`` in some paginated responses, thanks `erichaase `__ for the bug report Version 1.25.1 (September 28th, 2014) ------------------------------------- diff --git a/github/Commit.py b/github/Commit.py index 83727678..a53b5e44 100644 --- a/github/Commit.py +++ b/github/Commit.py @@ -150,17 +150,19 @@ class Commit(github.GithubObject.CompletableGithubObject): ) return github.CommitComment.CommitComment(self._requester, headers, data, completed=True) - def create_status(self, state, target_url=github.GithubObject.NotSet, description=github.GithubObject.NotSet): + def create_status(self, state, target_url=github.GithubObject.NotSet, description=github.GithubObject.NotSet, context=github.GithubObject.NotSet): """ :calls: `POST /repos/:owner/:repo/statuses/:sha `_ :param state: string :param target_url: string :param description: string + :param context: string :rtype: :class:`github.CommitStatus.CommitStatus` """ assert isinstance(state, (str, unicode)), state assert target_url is github.GithubObject.NotSet or isinstance(target_url, (str, unicode)), target_url assert description is github.GithubObject.NotSet or isinstance(description, (str, unicode)), description + assert context is github.GithubObject.NotSet or isinstance(context, (str, unicode)), context post_parameters = { "state": state, } @@ -168,6 +170,8 @@ class Commit(github.GithubObject.CompletableGithubObject): post_parameters["target_url"] = target_url if description is not github.GithubObject.NotSet: post_parameters["description"] = description + if context is not github.GithubObject.NotSet: + post_parameters["context"] = context headers, data = self._requester.requestJsonAndCheck( "POST", self._parentUrl(self._parentUrl(self.url)) + "/statuses/" + self.sha,