Skip to content

Commit fa0380e

Browse files
committed
Added versionadded Sphinx directives where possible.
Some functions have received enough churn that it is too much work to track down their initial supported version unfortunately.
1 parent 1101171 commit fa0380e

3 files changed

Lines changed: 22 additions & 1 deletion

File tree

github2/client.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@ def __init__(self, username=None, api_token=None, debug=False,
1313
An interface to GitHub's API:
1414
http://develop.github.com/
1515
16+
.. versionadded:: 0.2.0
17+
The ``requests_per_second`` parameter
18+
.. versionadded:: 0.3.0
19+
The ``cache`` and ``access_token`` parameters
20+
1621
:param str username: your own GitHub username.
1722
:param str api_token: can be found at https://github.com/account
1823
(while logged in as that user):
@@ -47,6 +52,8 @@ def project_for_user_repo(self, user, repo):
4752
def get_all_blobs(self, project, tree_sha):
4853
"""Get a list of all blobs for a specific tree
4954
55+
.. versionadded:: 0.3.0
56+
5057
:param str project: GitHub project
5158
:param str tree_sha: object ID of tree
5259
"""

github2/issues.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ class Issues(GithubCommand):
4040
def search(self, project, term, state="open"):
4141
"""Get all issues for project that match term with given state.
4242
43+
.. versionadded:: 0.3.0
44+
4345
:param str project: GitHub project
4446
:param str term: term to search issues for
4547
:param str state: can be either ``open`` or ``closed``.
@@ -60,6 +62,8 @@ def list(self, project, state="open"):
6062
def list_by_label(self, project, label):
6163
"""Get all issues for project with label.
6264
65+
.. versionadded:: 0.3.0
66+
6367
:param str project: GitHub project
6468
:param str label: a string representing a label (e.g., ``bug``).
6569
"""
@@ -69,6 +73,8 @@ def list_by_label(self, project, label):
6973
def list_labels(self, project):
7074
"""Get all labels for project.
7175
76+
.. versionadded:: 0.3.0
77+
7278
:param str project: GitHub project
7379
"""
7480
return self.get_values("labels", project, filter="labels")
@@ -105,6 +111,8 @@ def close(self, project, number):
105111
def reopen(self, project, number):
106112
"""Reopen a closed issue
107113
114+
.. versionadded:: 0.3.0
115+
108116
:param str project: GitHub project
109117
:param int number: issue number in the Github database
110118
"""
@@ -114,6 +122,8 @@ def reopen(self, project, number):
114122
def edit(self, project, number, title, body):
115123
"""Edit an existing issue
116124
125+
.. versionadded:: 0.3.0
126+
117127
:param str project: GitHub project
118128
:param int number: issue number in the Github database
119129
:param str title: title for issue

github2/repositories.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,12 @@ def show(self, project):
4444
"""
4545
return self.get_value("show", project, filter="repository",
4646
datatype=Repository)
47+
4748
def pushable(self):
48-
"""Return a list of repos you can push to that are not your own."""
49+
"""Return a list of repos you can push to that are not your own.
50+
51+
.. versionadded:: 0.3.0
52+
"""
4953
return self.get_values("pushable", filter="repositories", datatype=Repository)
5054

5155

0 commit comments

Comments
 (0)