Skip to content
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

add general function to get tags #1

Merged
merged 1 commit into from
Feb 4, 2023

Conversation

vsoch
Copy link

@vsoch vsoch commented Feb 4, 2023

this extends the updated get tags function (with pagination!) to use a general function, so a future caller can use the same functionality. I also use the original request base url as the base for the updated parameters and this assumes the Link returned is at the same url. If we hit cases where this isn't the case, we should use the url provided by the link and add back onto it the domain. I think for most of these pagination cases the base url won't change, so this is OK as a first shot.

Signed-off-by: vsoch [email protected]

this extends the updated get tags function (with pagination!) to
use a general function, so a future caller can use the same functionality.

Signed-off-by: vsoch <[email protected]>
@vsoch
Copy link
Author

vsoch commented Feb 4, 2023

For linking, this should update oras-project#68.

And TIL instead of parsing the header we can just look at response.links and that seems to have the same structure! See https://stackoverflow.com/questions/32312758/python-requests-link-headers. @wolfv if you like this better we can use this approach instead. I guess I'm indifferent, they are sort of the same thing, but one shows how the sausage is made. 😆

@wolfv wolfv merged commit 49c6778 into wolfv:fix_get_tags Feb 4, 2023
@wolfv
Copy link
Owner

wolfv commented Feb 4, 2023

Thanks! I also made some adjustments to make the function even more generic :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants