in lib/helpers/edit_on_gitlab.rb [47:68]
def resource_from_item(item)
identifier_path = item.identifier.to_s.delete_prefix("/")
product, _, repo_doc_path = identifier_path.partition("/")
repo = PRODUCT_REPOS[product]
if repo
file_path = "#{repo[:doc_directory]}/#{repo_doc_path}"
return repo.merge({ file_path: file_path })
end
{
project: "gitlab-org/gitlab-docs",
default_branch_name: "main",
file_path: item[:content_filename]
}
end