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

fix fragment in suggested_changelog_url causing exceptions #9604

Merged
merged 2 commits into from Apr 24, 2024

Conversation

jakecoffman
Copy link
Member

fixes #9565

The method changelog_from_suggested_url is trying to get a listing of the files so it can return them and get the html_url, so tmp_files should always be an array.

The reason it wasn't is because suggested_changelog_url had a fragment (e.g. #v2.8.6) which the Source.from_url doesn't handle, so we end up grabbing the file itself rather than the directory listing.

By stripping the fragment we get the listing which fixes the problem.

This is all a bit strange. It's weird we're using Source.from_url when we could use URI to parse. Also if we have the URL to the changelog it seems like we could transform the URL into the HTML URL without making a network call.

But for now I'll put this fix in and slowly back away...

@jakecoffman jakecoffman requested a review from a team as a code owner April 24, 2024 16:21
Copy link
Member

@Nishnha Nishnha left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for fixing this. We should put your suggestions from the OP into a separate issue so we don't lose it.

@jakecoffman jakecoffman merged commit 7fa81c6 into main Apr 24, 2024
121 checks passed
@jakecoffman jakecoffman deleted the fix-changelog-finder-fragments branch April 24, 2024 17:44
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.

Grouped update PR includes no details about upgrades (part 2)
2 participants