Hi,
We are using self managed GitLab Community Edition 13.2.1 running on a linux platform.
My Requirement : I need to place inline comments on files/resource/source files.
These files are placed at :
Root level of the Project
Under folder of a Project
Under multi-level folders of the Project.
I use the API as a curl command (followed - Commits API | GitLab) :
curl --request POST --header “PRIVATE-TOKEN: <my_access_token>”
–form “note=Please capture every minute details of the API.”
–form “path=README.md”
–form “line=25”
–form “line_type=new”
“https://gitlab.example.com/api/v4/projects/410/repository/commits /1bcc8b3e585aa729dbaa38d8e8a2b86d38fa1926e/comments”
The README.md file is in the root, the above API call places the inline comment on the right file and on the correct line number.
However, when I try place comments on a file that is under any folder, multilevel folders, the above API call fails. In the response I see - “path”:null,“line”:null,“line_type”:null
Below is the screenshot of my Repo:
I cannot place any inline comment for README.md and pom.xml files.
Below are formats that I have tried with the path parameter;
–form “path=EventProcessorSample/README.md”
–form “path=EventProcessorSample%2FREADME.md”
–form “path=%2FEventProcessorSample%2FREADME.md”
–form “path=my-personal-stuff/EventProcessorSample/README.md”
–form “path=/my-personal-stuff/EventProcessorSample/README.md”
–form “path=%2Fmy-personal-stuff%2FEventProcessorSample%2FREADME.md”
However all of the above resulted with same results - “path”:null,“line”:null,“line_type”:null
Could you please help me with the right usage of the API and the parameter.
When i want to place inline comments for a source file under multilevel folder, how will construct the parameter
Also, When I want to place multiple in-line comments on to a single file, how will I go about it.
Looking forward for some leads.
Thank you
Mahesh Maney