You've already forked wakapi-readme-stats
Merge branch 'master' into feat/difference_between_additions_and_deletions
This commit is contained in:
8
.github/workflows/dependency-review.yml
vendored
8
.github/workflows/dependency-review.yml
vendored
@@ -1,11 +1,5 @@
|
|||||||
name: Dependency review
|
name: Dependency review
|
||||||
on:
|
on: pull_request
|
||||||
push:
|
|
||||||
branches: master
|
|
||||||
pull_request:
|
|
||||||
workflow_dispatch:
|
|
||||||
schedule:
|
|
||||||
- cron: 45 15 * * 5
|
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
|
|||||||
@@ -121,7 +121,7 @@ GITHUB_API_QUERIES = {
|
|||||||
""",
|
""",
|
||||||
"hide_outdated_comment": """
|
"hide_outdated_comment": """
|
||||||
mutation {
|
mutation {
|
||||||
minimizeComment(input: {classifier:OUTDATED, subjectId: "$id"}) {
|
minimizeComment(input: {classifier: OUTDATED, subjectId: "$id"}) {
|
||||||
clientMutationId
|
clientMutationId
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -227,7 +227,7 @@ class DownloadManager:
|
|||||||
return await DownloadManager._get_remote_resource(resource, safe_load)
|
return await DownloadManager._get_remote_resource(resource, safe_load)
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
async def _fetch_graphql_query(query: str, **kwargs) -> Dict:
|
async def _fetch_graphql_query(query: str, retries_count: int = 10, **kwargs) -> Dict:
|
||||||
"""
|
"""
|
||||||
Execute GitHub GraphQL API simple query.
|
Execute GitHub GraphQL API simple query.
|
||||||
:param query: Dynamic query identifier.
|
:param query: Dynamic query identifier.
|
||||||
@@ -241,6 +241,8 @@ class DownloadManager:
|
|||||||
)
|
)
|
||||||
if res.status_code == 200:
|
if res.status_code == 200:
|
||||||
return res.json()
|
return res.json()
|
||||||
|
elif res.status_code == 502 and retries_count > 0:
|
||||||
|
return await DownloadManager._fetch_graphql_query(query, retries_count - 1, **kwargs)
|
||||||
else:
|
else:
|
||||||
raise Exception(f"Query '{query}' failed to run by returning code of {res.status_code}: {res.json()}")
|
raise Exception(f"Query '{query}' failed to run by returning code of {res.status_code}: {res.json()}")
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user