Skip to content

Commit

Permalink
feat: gql unit test
Browse files Browse the repository at this point in the history
- gh token patching
  • Loading branch information
ghinks committed Dec 23, 2024
1 parent 1d0a752 commit 793140d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pr_reviews/queries/get_repos_gql.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ def get_repos_by_language(org: str, languages: list[str]) -> list[str]:
# check for github_token and raise an exception if it
# is not defined

GITHUB_TOKEN = os.getenv("GITHUB_TOKEN")
github_token = os.getenv("GITHUB_TOKEN")

if GITHUB_TOKEN is None:
if github_token is None:
raise GitHubTokenNotDefinedError
url = "https://api.github.com/graphql"
headers = {
"Authorization": f"Bearer {GITHUB_TOKEN}",
"Authorization": f"Bearer {github_token}",
"Content-Type": "application/json",
}
query = """
Expand Down

0 comments on commit 793140d

Please sign in to comment.