blob: 60fc0a01259d7447f6d699f66f7e0b2d06585952 [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>ChromeOS Launch Bugs go/launchbugs </title>
</head>
<body >
<script>
// Read the parameters passed to the url
function GetURLParameter(sParam) {
var sPageURL = window.location.search.substring(1);
var sURLVariables = sPageURL.split('&');
for (var i = 0; i < sURLVariables.length; i++) {
var sParameterName = sURLVariables[i].split('=');
if (sParameterName[0] == sParam) {
return sParameterName[1];
}
}
}
var base_url = 'https://bugs.chromium.org/p/chromium/issues/list?sort=-component te&groupby=&colspec=ID Pri Component Summary TL PM TE ChromeOS-Test stable.M-Target Opened ATFw ChromeOS-Test-approver'
//Add milestone and TE to crbug url and redirect to it
function UpdateUrlsWithMilestone(milestone, te, s, c) {
var src = base_url.concat('&q=(stable.M-Target=<milestone> OR stable-Full.M-Target=<milestone> OR stable-Exp.M-Target=<milestone>) <TE> <COMPONENT> <status>').concat(' OS=Chrome -OS:Mac,IOS,linux,Android,Windows,Fuchsia,All -Status:Duplicate,WontFix,Archived has:ChromeOS-Leadership-Full&can=1')
src = src.replace(/<milestone>/g, milestone)
if (!te) {
console.log('No te')
src = src.replace(/<TE>/g, "")
}
else {
console.log('replace te')
src = src.replace(/<TE>/g, "TE:"+te)
}
if (!s) {
console.log('No status')
src = src.replace(/<status>/g, "")
}
else {
console.log('replace status')
src = src.replace(/<status>/g, "Status:"+s)
}
if (!c) {
console.log('No component')
src = src.replace(/<COMPONENT>/g, "")
}
else {
console.log('replace component')
src = src.replace(/<COMPONENT>/g, "component:"+c)
}
window.location.replace(src);
}
var m = GetURLParameter('m')
var te = GetURLParameter('te')
var s = GetURLParameter('status')
var c = GetURLParameter('c')
//Add use of team variables
var team = GetURLParameter('team')
if (team && team.toLowerCase() == "corex"){
if (!te)
te = 'dhaddock,kyleshima,hyungtaekim,awendy'
else if(te != "new"){
te = te.concat(',dhaddock,kyleshima,hyungtaekim,awendy')
}
}
if (te == "new") {
console.log('te = new url')
window.location.replace(base_url.concat('&num=100&q=Type=FLT-Launch OS=Chrome -OS:Mac,IOS,linux,Android,Windows,Fuchsia,All -ChromeOS-Test=APPROVED has:ChromeOS-Leadership-Full -has:TE&can=2'))
}
else if (!m) {
console.log('Error: No milestone supplied.')
window.location.replace(base_url.concat('&num=100&q=Type=FLT-Launch OS=Chrome -OS:Mac,IOS,linux,Android,Windows,Fuchsia,All -ChromeOS-Test=APPROVED has:ChromeOS-Leadership-Full&can=2'))
}
else {
UpdateUrlsWithMilestone(m, te, s, c)
}
</script>
</body>
</html>