Skip to content

Commit

Permalink
Refactor GitHub Query Utilization for Package Versions
Browse files Browse the repository at this point in the history
Change the method used to fetch GitHub GraphQL queries in github.py
Shift from vulnerabilities.utils.fetch_github_graphql_query to fetchcode.package_versions.github_response
The change avoids dependencies on Django apps in vulnerabilities.utils
Signed-off-by: PoJuDeSu <spes9850401@gmail.com>
  • Loading branch information
poju3185 committed Mar 21, 2024
1 parent 4a6734b commit 23d6702
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions vulntotal/datasources/github.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
from dotenv import load_dotenv
from packageurl import PackageURL

from vulnerabilities import utils
from fetchcode.package_versions import github_response
from vulntotal.validator import DataSource
from vulntotal.validator import InvalidCVEError
from vulntotal.validator import VendorData
Expand All @@ -35,7 +35,7 @@ def fetch_github(self, graphql_query):
GH_TOKEN="your-github-token"
"""
load_dotenv()
return utils.fetch_github_graphql_query(graphql_query)
return github_response(graphql_query)

def datasource_advisory(self, purl) -> Iterable[VendorData]:
end_cursor = ""
Expand Down

0 comments on commit 23d6702

Please sign in to comment.