const baseUrl = `${window.gitlist.basepath}/${window.gitlist.repo}`
const search_query = window.gitlist.search_query;
const urls = {
tree: (options) => {
return `${baseUrl}/${options.checkout}`;
},
commits: (options) => {
return `${baseUrl}/commits/${options.checkout}`;
},
commit: (options) => {
return `${baseUrl}/commit/${options.checkout}`;
},
stats: (options) => {
return `${baseUrl}/stats/${options.checkout}`;
},
network: (options) => {
return `${baseUrl}/network/${options.checkout}`;
},
blob: (options) => {
return `${baseUrl}/blob/${options.checkout}/${path}`;
},
blame: (options) => {
return `${baseUrl}/blame/${options.checkout}`;
},
treegraph: (options) => {
return `${baseUrl}/treegraph/${options.checkout}`;
},
search: (options) => {
return {
url: `${baseUrl}/tree/${options.checkout}/search?query=${search_query}`,
post: true,
}
},
searchcommits: (options) => {
return {
url: `${baseUrl}/commits/${options.checkout}/search?query=${search_query}`,
post: true,
};
},