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

[BUG] value coming from GERRIT_PROJECT must be URL encoded for gerrit API calls :) #7

Open
sheputis opened this issue May 8, 2023 · 1 comment

Comments

@sheputis
Copy link

sheputis commented May 8, 2023

The 'project' name is not URL encoded, so whenever it has characters that need to be URL encoded, gergich fails.

For example if the GERRIT_PROJECT env variable is something like 'some/project', then it is put into the URL string(for the gerrit API calls) as is, but it should be encoded to be 'some%2Fproject'.

since i dont have the permissions to push a pull request, im writing a proposal here:

  1. change lib/gergich.rb:55 to "#{ERB::Util.url_encode info[:project]}~#{ERB::Util.url_encode info[:branch]}~#{info[:change_id]}"
  2. Adapt test in spec/gergich_spec.rb:64
@sheputis
Copy link
Author

added the change here #8

@sheputis sheputis reopened this Jun 23, 2023
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

No branches or pull requests

1 participant