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

docs(gitlab): Update the comment about url encoding #36

Merged
merged 1 commit into from
Nov 3, 2023
Merged

docs(gitlab): Update the comment about url encoding #36

merged 1 commit into from
Nov 3, 2023

Conversation

algernon
Copy link
Collaborator

@algernon algernon commented Nov 3, 2023

Other parts of the GitLab API use the user and repo names without URL encoding, so there really is no need to encode those. Thus, the only remaining part that needs encoding, is the / path separator, which we manually url-encoded to %2F.

If we encoded the user and repo too, that might lead to surprising results later down the line. To not hide problems, leaving them as-is is the preferable way.

Update the comment on gitlab_api_get_releases accordingly.

Fixes #12.

@algernon algernon requested a review from cafkafk as a code owner November 3, 2023 08:37
Copy link
Owner

@cafkafk cafkafk left a comment

Choose a reason for hiding this comment

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

Consider this approved, just need to be based on #30 ig

Other parts of the GitLab API use the user and repo names without URL
encoding, so there really is no need to encode *those*. Thus, the only
remaining part that needs encoding, is the `/` path separator, which we
manually url-encoded to `%2F`.

If we encoded the user and repo too, that might lead to surprising
results later down the line. To not hide problems, leaving them as-is is
the preferable way.

Update the comment on `Gitlab::get_api_releases_url` accordingly.

Fixes #12.

Signed-off-by: Gergely Nagy <me@gergo.csillger.hu>
@algernon
Copy link
Collaborator Author

algernon commented Nov 3, 2023

Rebased on main

@cafkafk cafkafk merged commit 10a6066 into cafkafk:main Nov 3, 2023
3 checks passed
@algernon algernon deleted the %2F branch November 3, 2023 18:00
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.

bug: do proper url encoding
2 participants