Skip to content

Commit 277f6ba

Browse files
committed
Merge branch 'request/41' into bugfix/1.7.3
2 parents 0dfd89e + 0bb3732 commit 277f6ba

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

git_repo/services/ext/github.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,7 @@ def __init__(self, *args, **kwarg):
2121
def connect(self):
2222
try:
2323
self.gh.login(token=self._privatekey)
24-
self.username = self.gh.user().name
25-
self.username = self.gh.user().name
24+
self.username = self.gh.user().login
2625
except github3.models.GitHubError as err:
2726
if err.code is 401:
2827
if not self._privatekey:
@@ -81,7 +80,7 @@ def _format_gist(self, gist):
8180

8281
def gist_list(self, gist=None):
8382
if not gist:
84-
for gist in self.gh.iter_gists(self.gh.user().name):
83+
for gist in self.gh.iter_gists(self.gh.user().login):
8584
yield (gist.html_url, gist.description)
8685
else:
8786
gist = self.gh.gist(self._format_gist(gist))
@@ -205,5 +204,5 @@ def get_auth_token(cls, login, password):
205204

206205
@property
207206
def user(self):
208-
return self.gh.user().name
207+
return self.gh.user().login
209208

0 commit comments

Comments
 (0)