in frontend/app/getbuilds.ts [11:29]
async function getLatestBuildInternal(
projectId: string,
buildJob: string,
branchName: string
): Promise<BuildInfo> {
//the branch name may contain a /; in this case it must be _double_ encoded or the / is considered part of the html path
const url = `/api/project/${doubleEncode(projectId)}/${doubleEncode(
branchName
)}/${buildJob}/buildinfo`;
const response = await axios.get<BuildInfo>(url, {
validateStatus: () => true,
});
switch (response.status) {
case 200:
return response.data;
default:
throw `Server returned ${response.status}`;
}
}