8000 [QA] Use Git*H*ub for the service name. · ask/python-github2@f5324ac · GitHub
[go: up one dir, main page]

Skip to content

Commit f5324ac

Browse files
committed
[QA] Use Git*H*ub for the service name.
1 parent 6432fe9 commit f5324ac

File tree

10 files changed

+52
-52
lines changed

10 files changed

+52
-52
lines changed

README.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
================================================================================
2-
github2 - Github API v2 library for Python.
2+
github2 - GitHub API v2 library for Python.
33
================================================================================
44

55
:Authors:
@@ -16,15 +16,15 @@ github2 - Github API v2 library for Python.
1616
of work needed in moving away from GitHub's API v2.
1717

1818
This is a Python library implementing all of the features available in version 2
19-
of the `Github API`_.
19+
of the `GitHub API`_.
2020

2121
See the ``doc/`` directory for installation instructions and usage information.
2222
If you prefer you can also read the `documentation online`_.
2323

2424
.. _switch off API v2: https://github.com/blog/1090-github-api-moving-on
2525
.. _remoteobjects: https://github.com/saymedia/remoteobjects
2626
.. _micromodels: https://github.com/j4mie/micromodels
27-
.. _Github API: http://develop.github.com/
27+
.. _GitHub API: http://develop.github.com/
2828
.. _documentation online: http://packages.python.org/github2
2929

3030
License

doc/index.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
.. module:: github2
1111
:synopsis: GitHub API v2 library for Python
1212

13-
``github2`` - Github API v2 library for Python
13+
``github2`` - GitHub API v2 library for Python
1414
==============================================
1515

1616
.. warning::
@@ -31,15 +31,15 @@
3131
:class: sidebar
3232

3333
This is a Python library implementing all of the features available in version 2
34-
of the `Github API`_.
34+
of the `GitHub API`_.
3535

36-
You should read the developer documentation for the `Github API`_ first.
36+
You should read the developer documentation for the `GitHub API`_ first.
3737

3838
:Git repository: https://github.com/ask/python-github2/
3939
:Issue tracker: https://github.com/ask/python-github2/issues/
4040
:Contributors: https://github.com/ask/python-github2/contributors/
4141

42-
.. _Github API: http://develop.github.com/
42+
.. _GitHub API: http://develop.github.com/
4343

4444
Contents
4545
--------

examples/friend-or-follow.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@
1010
OPTION_LIST = (
1111
optparse.make_option('-t', '--api-token',
1212
default=None, action="store", dest="api_token", type="str",
13-
help="Github API token. Default is to find this from git config"),
13+
help="GitHub API token. Default is to find this from git config"),
1414
optparse.make_option('-u', '--api-user',
1515
default=None, action="store", dest="api_user", type="str",
16-
help="Github Username. Default is to find this from git config"),
16+
help="GitHub Username. Default is to find this from git config"),
1717
)
1818
BY_LOWER = lambda value: value.lower()
1919

github2/client.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ def __init__(self, username=None, api_token=None, requests_per_second=None,
5959
self.pull_requests = PullRequests(self.request)
6060

6161
def project_for_user_repo(self, user, repo):
62-
"""Return Github identifier for a user's repository
62+
"""Return GitHub identifier for a user's repository
6363
6464
:param str user: repository owner
6565
:param str repo: repository name
@@ -97,7 +97,7 @@ def get_tree(self, project, tree_sha):
9797
return tree.get("tree", [])
9898

9999
def get_network_meta(self, project):
100-
"""Get Github metadata associated with a project
100+
"""Get GitHub metadata associated with a project
101101
102102
:param str project: GitHub project
103103
"""
@@ -106,10 +106,10 @@ def get_network_meta(self, project):
106106
"network_meta"]), {})
107107

108108
def get_network_data(self, project, nethash, start=None, end=None):
109-
"""Get chunk of Github network data
109+
"""Get chunk of GitHub network data
110110
111111
:param str project: GitHub project
112-
:param str nethash: identifier provided by ``get_network_meta``
112+
:param str nethash: identifier provided by :meth:`get_network_meta`
113113
:param int start: optional start point for data
114114
:param int stop: optional end point for data
115115
"""

github2/core.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ def wrapper(datetime_):
5959

6060
@_handle_naive_datetimes
6161
def datetime_to_ghdate(datetime_):
62-
"""Convert Python datetime to Github date string
62+
"""Convert Python datetime to GitHub date string
6363
6464
:param datetime datetime_: datetime object to convert
6565
"""
@@ -68,7 +68,7 @@ def datetime_to_ghdate(datetime_):
6868

6969
@_handle_naive_datetimes
7070
def datetime_to_commitdate(datetime_):
71-
"""Convert Python datetime to Github date string
71+
"""Convert Python datetime to GitHub date string
7272
7373
:param datetime datetime_: datetime object to convert
7474
"""
@@ -80,7 +80,7 @@ def datetime_to_commitdate(datetime_):
8080

8181

8282
def datetime_to_isodate(datetime_):
83-
"""Convert Python datetime to Github date string
83+
"""Convert Python datetime to GitHub date string
8484
8585
:param str datetime_: datetime object to convert
8686

github2/issues.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ def show(self, project, number):
8686
"""Get all the data for issue by issue-number.
8787
8888
:param str project: GitHub project
89-
:param int number: issue number in the Github database
89+
:param int number: issue number in the GitHub database
9090
"""
9191
return self.get_value("show", project, str(number),
9292
filter="issue", datatype=Issue)
@@ -108,7 +108,7 @@ def close(self, project, number):
108108
"""Close an issue
109109
110110
:param str project: GitHub project
111-
:param int number: issue number in the Github database
111+
:param int number: issue number in the GitHub database
112112
"""
113113
return self.get_value("close", project, str(number), filter="issue",
114114
datatype=Issue, method="POST")
@@ -120,7 +120,7 @@ def reopen(self, project, number):
120120
.. versionadded:: 0.3.0
121121
122122
:param str project: GitHub project
123-
:param int number: issue number in the Github database
123+
:param int number: issue number in the GitHub database
124124
"""
125125
return self.get_value("reopen", project, str(number), filter="issue",
126126
datatype=Issue, method="POST")
@@ -132,7 +132,7 @@ def edit(self, project, number, title, body):
132132
.. versionadded:: 0.3.0
133133
134134
:param str project: GitHub project
135-
:param int number: issue number in the Github database
135+
:param int number: issue number in the GitHub database
136136
:param str title: title for issue
137137
:param str body: body for issue
138138
"""
@@ -146,7 +146,7 @@ def add_label(self, project, number, label):
146146
"""Add a label to an issue
147147
148148
:param str project: GitHub project
149-
:param int number: issue number in the Github database
149+
:param int number: issue number in the GitHub database
150150
:param str label: label to attach to issue
151151
"""
152152
return self.get_values("label/add", project, label, str(number),
@@ -157,7 +157,7 @@ def remove_label(self, project, number, label):
157157
"""Remove an existing label from an issue
158158
159159
:param str project: GitHub project
160-
:param int number: issue number in the Github database
160+
:param int number: issue number in the GitHub database
161161
:param str label: label to remove from issue
162162
"""
163163
return self.get_values("label/remove", project, label, str(number),
@@ -168,7 +168,7 @@ def comment(self, project, number, comment):
168168
"""Comment on an issue.
169169
170170
:param str project: GitHub project
171-
:param int number: issue number in the Github database
171+
:param int number: issue number in the GitHub database
172172
:param str comment: comment to attach to issue
173173
"""
174174
comment_data = {'comment': comment}
@@ -180,7 +180,7 @@ def comments(self, project, number):
180180
"""View comments on an issue.
181181
182182
:param str project: GitHub project
183-
:param int number: issue number in the Github database
183+
:param int number: issue number in the GitHub database
184184
"""
185185
return self.get_values("comments", project, str(number),
186186
filter="comments", datatype=Comment)

github2/pull_requests.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ def create(self, project, base, head, title=None, body=None, issue=None):
5353
issue. If an ``issue`` parameter is supplied the pull request is
5454
attached to that issue, else a new pull request is created.
5555
56-
:param str project: the Github project to send the pull request to
56+
:param str project: the GitHub project to send the pull request to
5757
:param str base: branch changes should be pulled into
5858
:param str head: branch of the changes to be pulled
5959
:param str title: title for pull request
@@ -78,16 +78,16 @@ def create(self, project, base, head, title=None, body=None, issue=None):
7878
def show(self, project, number):
7979
"""Show a single pull request
8080
81-
:param str project: Github project
82-
:param int number: pull request number in the Github database
81+
:param str project: GitHub project
82+
:param int number: pull request number in the GitHub database
8383
"""
8484
return self.get_value(project, str(number), filter="pull",
8585
datatype=PullRequest)
8686

8787
def list(self, project, state="open", page=1):
8888
"""List all pull requests for a project
8989
90-
:param str project: Github project
90+
:param str project: GitHub project
9191
:param str state: can be either ``open`` or ``closed``
9292
:param int page: optional page number
9393
"""

github2/repositories.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ def list(self, user=None, page=1):
7373
logged-in user when ``user`` wasn't supplied. This functionality is
7474
brittle and will be removed in a future release!
7575
76-
:param str user: Github user name to list repositories for
76+
:param str user: GitHub user name to list repositories for
7777
:param int page: optional page number
7878
"""
7979
user = user or self.request.username
@@ -160,8 +160,8 @@ def list_collaborators(self, project):
160160
def add_collaborator(self, project, username):
161161
"""Adds an add_collaborator to a repo
162162
163-
:param str project: Github project
164-
:param str username: Github user to add as collaborator
163+
:param str project: GitHub project
164+
:param str username: GitHub user to add as collaborator
165165
"""
166166
return self.make_request("collaborators", project, "add", username,
167167
method="POST")
@@ -170,53 +170,53 @@ def add_collaborator(self, project, username):
170170
def remove_collaborator(self, project, username):
171171
"""Removes an add_collaborator from a repo
172172
173-
:param str project: Github project
174-
:param str username: Github user to add as collaborator
173+
:param str project: GitHub project
174+
:param str username: GitHub user to add as collaborator
175175
"""
176176
return self.make_request("collaborators", project, "remove",
177177
username, method="POST")
178178

179179
def network(self, project):
180180
"""Get network data for project
181181
182-
:param str project: Github project
182+
:param str project: GitHub project
183183
"""
184184
return self.get_values("show", project, "network", filter="network",
185185
datatype=Repository)
186186

187187
def languages(self, project):
188188
"""Get programming language data for project
189189
190-
:param str project: Github project
190+
:param str project: GitHub project
191191
"""
192192
return self.get_values("show", project, "languages",
193193
filter="languages")
194194

195195
def tags(self, project):
196196
"""Get tags for project
197197
198-
:param str project: Github project
198+
:param str project: GitHub project
199199
"""
200200
return self.get_values("show", project, "tags", filter="tags")
201201

202202
def branches(self, project):
203203
"""Get branch names for project
204204
205-
:param str project: Github project
205+
:param str project: GitHub project
206206
"""
207207
return self.get_values("show", project, "branches", filter="branches")
208208

209209
def watchers(self, project):
210210
"""Get list of watchers for project
211211
212-
:param str project: Github project
212+
:param str project: GitHub project
213213
"""
214214
return self.get_values("show", project, "watchers", filter="watchers")
215215

216216
def watching(self, for_user=None, page=None):
217217
"""Lists all the repos a user is watching
218218
219-
:param str for_user: optional Github user name to list repositories for
219+
:param str for_user: optional GitHub user name to list repositories for
220220
:param int page: optional page number
221221
"""
222222
for_user = for_user or self.request.username
@@ -226,7 +226,7 @@ def watching(self, for_user=None, page=None):
226226
def list_contributors(self, project):
227227
"""Lists all the contributors in a project
228228
229-
:param str project: Github project
229+
:param str project: GitHub project
230230
"""
231231
return self.get_values("show", project, "contributors",
232232
filter="contributors", datatype=User)

github2/request.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,11 +81,11 @@ def charset_from_headers(headers):
8181

8282

8383
class GithubError(Exception):
84-
"""An error occurred when making a request to the Github API."""
84+
"""An error occurred when making a request to the GitHub API."""
8585

8686

8787
class HttpError(RuntimeError):
88-
"""A HTTP error occured when making a request to the Github API."""
88+
"""A HTTP error occured when making a request to the GitHub API."""
8989
def __init__(self, message, content, code):
9090
"""Create a HttpError exception
9191

github2/users.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -73,42 +73,42 @@ def search_by_email(self, query):
7373

7474
@enhanced_by_auth
7575
def show(self, username):
76-
"""Get information on Github user
76+
"""Get information on GitHub user
7777
7878
if ``username`` is ``None`` or an empty string information for the
7979
currently authenticated user is returned.
8080
81-
:param str username: Github user name
81+
:param str username: GitHub user name
8282
"""
8383
return self.get_value("show", username, filter="user", datatype=User)
8484

8585
def followers(self, username):
86-
"""Get list of Github user's followers
86+
"""Get list of GitHub user's followers
8787
88-
:param str username: Github user name
88+
:param str username: GitHub user name
8989
"""
9090
return self.get_values("show", username, "followers", filter="users")
9191

9292
def following(self, username):
93-
"""Get list of users a Github user is following
93+
"""Get list of users a GitHub user is following
9494
95-
:param str username: Github user name
95+
:param str username: GitHub user name
9696
"""
9797
return self.get_values("show", username, "following", filter="users")
9898

9999
@requires_auth
100100
def follow(self, other_user):
101-
"""Follow a Github user
101+
"""Follow a GitHub user
102102
103-
:param str other_user: Github user name
103+
:param str other_user: GitHub user name
104104
"""
105105
return self.get_values("follow", other_user, method="POST")
106106

107107
@requires_auth
108108
def unfollow(self, other_user):
109-
"""Unfollow a Github user
109+
"""Unfollow a GitHub user
110110
111-
:param str other_user: Github user name
111+
:param str other_user: GitHub user name
112112
"""
113113
return self.get_values("unfollow", other_user, method="POST")
114114

0 commit comments

Comments
 (0)
0