forked from blackducksca-workflow-samples/automatic-fixpr
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
25 lines (25 loc) · 5.56 KB
/
index.html
File metadata and controls
25 lines (25 loc) · 5.56 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
<!DOCTYPE html>
<html>
<head>
<title>Redirecting to Latest Scan Results...</title>
<script>
async function redirectToLatestRun() {
try {
const response = await fetch('https://api.github.com/repos/blackducksca-user-guide/automatic-fixpr/actions/workflows/nodejs-npm.yml/runs');
const data = await response.json();
if (data.workflow_runs && data.workflow_runs.length > 0) {
window.location.href = data.workflow_runs[0].html_url;
} else {
window.location.href = 'https://github.com/blackducksca-user-guide/automatic-fixpr/actions';
}
} catch (error) {
window.location.href = 'https://github.com/blackducksca-user-guide/automatic-fixpr/actions';
}
}
redirectToLatestRun();
</script>
</head>
<body>
<p>Redirecting to latest scan results...</p>
</body>
</html>