Update projects related API documentation (id can be always namespace + project_name)
According to this code
def user_project
@project ||= find_project(params[:id])
@project || not_found!("Project")
end
def find_project(id)
project = Project.find_with_namespace(id) || Project.find_by(id: id)
if project && can?(current_user, :read_project, project)
project
else
nil
end
end
It is possible to get a single project (and its sub-resources, e.g. commits) by its namespace and project_name but it's only documented here not for API calls like the Commit status.
I'm the lead developer of the Jenkins gitlab-plugin which uses the namespace + project_name as project_id to update the commit status of the GitLab repository configured for a Jenkins job. Within the last months several issues were opened for the reason that the commit status update isn't working. All of them refer to the API documentation and claim about a wrong usage of the GitLab API. None of the issues was caused by a "wrong" usage of the API as the code above shows that it's possible to use the API this way. To prevent such issues in the future it would be nice if you would adapt the API documentation to use everywhere for the project_id the following description: "The ID or NAMESPACE/PROJECT_NAME of a project"
Thanks,
Robin