Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion augur/tasks/github/releases/core.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#SPDX-License-Identifier: MIT
from augur.tasks.github.util.github_task_session import *
from augur.tasks.github.util.github_graphql_data_access import GithubGraphQlDataAccess
from augur.application.db.models import *
from augur.tasks.github.util.util import get_owner_repo
from augur.tasks.github.util.gh_graphql_entities import request_graphql_dict
Expand Down Expand Up @@ -159,7 +160,7 @@ def fetch_data(key_auth, logger, github_url, repo_id, tag_only = False):

owner, repo = get_owner_repo(github_url)

url = 'https://api.github.com/graphql'
url = GithubGraphQlDataAccess.base_url()

query = get_query(logger, owner, repo, tag_only)

Expand Down
2 changes: 1 addition & 1 deletion augur/tasks/github/repo_info/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@
return False

def grab_repo_info_from_graphql_endpoint(key_auth, logger, query):
url = 'https://api.github.com/graphql'
url = GithubGraphQlDataAccess.base_url()
# Hit the graphql endpoint and retry 3 times in case of failure
logger.info("Hitting endpoint: {} ...\n".format(url))
data = request_graphql_dict(key_auth, logger, url, query)
Expand Down Expand Up @@ -284,7 +284,7 @@

try:
response_data = response.json()
except:

Check warning on line 287 in augur/tasks/github/repo_info/core.py

View workflow job for this annotation

GitHub Actions / runner / pylint

[pylint] reported by reviewdog 🐶 W0702: No exception type(s) specified (bare-except) Raw Output: augur/tasks/github/repo_info/core.py:287:4: W0702: No exception type(s) specified (bare-except)
response_data = json.loads(json.dumps(response.text))

#Insert any data that was returned
Expand Down
5 changes: 5 additions & 0 deletions augur/tasks/github/util/github_graphql_data_access.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,12 @@ class InvalidDataException(Exception):
pass

class GithubGraphQlDataAccess:
"""Utilities for accessing the GitHub GraphQL API
"""

@staticmethod
def base_url():
return URL

def __init__(self, key_manager, logger: logging.Logger, ingore_not_found_error=False):

Expand Down
Loading