Skip to content

Commit

Permalink
feat: gql unit test
Browse files Browse the repository at this point in the history
- gh token patching
ghinks committed Dec 23, 2024
1 parent f7aa63a commit 1d0a752
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pr_reviews/queries/get_repos_gql.py
Original file line number Diff line number Diff line change
@@ -5,14 +5,16 @@
from pr_reviews.queries import TIMEOUT
from pr_reviews.queries.local_exceptions import GitHubTokenNotDefinedError

GITHUB_TOKEN = os.getenv("GITHUB_TOKEN")

# exceptions.py


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")

if GITHUB_TOKEN is None:
raise GitHubTokenNotDefinedError
url = "https://api.github.com/graphql"

0 comments on commit 1d0a752

Please sign in to comment.