class Dependabot::Clients::Azure
def fetch_repo_contents_treeroot(commit = nil, path = nil)
def fetch_repo_contents_treeroot(commit = nil, path = nil) actual_path = path actual_path = "/" if path.to_s.empty? tree_url = T.must(source.api_endpoint) + source.organization + "/" + source.project + "/_apis/git/repositories/" + source.unscoped_repo + "/items?path=" + T.must(actual_path) unless commit.to_s.empty? tree_url += "&versionDescriptor.versionType=commit" \ "&versionDescriptor.version=" + T.must(commit) end tree_response = get(tree_url) JSON.parse(tree_response.body).fetch("objectId") end