-
Notifications
You must be signed in to change notification settings - Fork 200
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Time travel to the date of advisory publish time when importing #467
Conversation
ebb6afa
to
33d8daa
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. See my comments inline for your consideration!
@@ -347,22 +429,51 @@ class GitHubTagsAPI(VersionAPI): | |||
package_type = "github" | |||
|
|||
async def load_api(self, repo_set): | |||
async with client_session() as session: | |||
session = client_session() | |||
async with session as session: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This code looks hard to read... we should have intermediate variable to avoid the nested complexity, possibly using generator expressions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tracking this in #492 .
Could you elaborate an approach there ?
for owner_repo in repo_set | ||
if owner_repo.lower() not in self.cache | ||
] | ||
) | ||
|
||
async def fetch(self, owner_repo: str, session) -> None: | ||
async def fetch(self, owner_repo: str, endpoint=None) -> None: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about using a purl instead owner_repo
Signed-off-by: Shivam Sandbhor <[email protected]>
Signed-off-by: Shivam Sandbhor <[email protected]>
Signed-off-by: Shivam Sandbhor <[email protected]>
Signed-off-by: Shivam Sandbhor <[email protected]>
Signed-off-by: Shivam Sandbhor <[email protected]>
33d8daa
to
dd4c14c
Compare
Signed-off-by: Shivam Sandbhor <[email protected]>
This PR gets us one step closer to #140 (comment)
High level working:
*VersionAPI
classes to instead accept a cutoff date, to partition the versions accordingly. Here's a simple snippetThings to do
new
andvalid
keys, use a class. @pombredanne please help in naming these.