-
Notifications
You must be signed in to change notification settings - Fork 13
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
Issue with gl_push_file related to file_path #73
Comments
I am not sure how this should work for subdirectories. However, the function does not send an existing file, It creates a file with the content sent as text. Otherwise, you may want to look at this issue: #69 Here is the documentation of the API call used, if you would like to look at it: https://docs.gitlab.com/ee/api/repository_files.html#create-new-file-in-repository And yes, the path should be URL encoded I'd be happy to receive a Pull request for a fix. |
I am willing to pull a request to fix but I just want to agree on how to manage this. I see two options:
I would prefer option 1 for consistency with other function calls but I understand that, to avoid problems with existing code, option 2 is better. What do you think ? |
I think that parameters should be user-friendly. Then, option 2.
I think you only need to add Following CONTRIBUTING may be long. I would accept an example with your own repository, that I can adapt to the {gitlabr} unit tests. |
This is now included in the development version of gitlabr |
I cannot succeed in using gl_push_file() with an existing file like "folder/file.txt".
The problem is that function gl_file_exists() uses the plain file path while, to get the file, the call to gitlab() function should use the URL encoded version of file_path "folder%2Ffile.txt".
Consequence is that with an existing file, gl_push_file() do not work neither using the plain path or the encoded path works.
The text was updated successfully, but these errors were encountered: