Skip to content

Grab the correct name of RemoteOrganization to use in the query #7430

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Sep 8, 2020
7 changes: 5 additions & 2 deletions readthedocs/oauth/services/github.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def sync_repositories(self):

def sync_organizations(self):
"""Sync organizations from GitHub API."""
orgs = []
orgs_details = []
repositories = []

try:
Expand All @@ -66,6 +66,9 @@ def sync_organizations(self):
'{org_url}/repos'.format(org_url=org['url']),
)

# Add organization details to the result
orgs_details.extend(org_resp.json())

# Add all the repositories for this organization to the result
repositories.extend(org_repos)

Expand All @@ -79,7 +82,7 @@ def sync_organizations(self):
'try reconnecting your account'
)

return orgs, repositories
return orgs_details, repositories

def create_repository(self, fields, privacy=None, organization=None):
"""
Expand Down