Skip to content

Commit

Permalink
Fix typo
Browse files Browse the repository at this point in the history
and remove unrelated changes
  • Loading branch information
isuruf committed Nov 9, 2023
1 parent e483400 commit 1732f56
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions conda_smithy/cirun_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,12 @@ def get_cirun_installation_id(owner: str) -> int:
return 18453316
else:
gh = Github(gh_token)
gh_owner = gh.get_user(owner)
for inst in gh_owner.get_installations:
user = gh.get_user()
if user.login == owner:
user_or_org = user
else:
user_or_org = gh.get_organization(owner)
for inst in user_or_org.get_installations:
if inst.raw_data["app_slug"] == "cirun-application":
return inst.app_id
raise ValueError(f"cirun not found for owner {owner}")
Expand Down Expand Up @@ -47,9 +51,9 @@ def add_repo_to_cirun_resource(
print(
f"Adding repo {owner}/{repo} to resource {resource} with policy_args: {policy_args}"
)
gh = Github(gh_token)
gh = Github(gh_token())
gh_owner = gh.get_user(owner)
gh_repo = gh_owner.get(repo)
gh_repo = gh_owner.get_repo(repo)
response = cirun.add_repo_to_resources(
owner,
repo,
Expand Down

0 comments on commit 1732f56

Please sign in to comment.