Skip to content

Commit 12a2927

Browse files
committed
meta: add index.html to test something
I'm going to see if a static GitHub Pages page can fetch our GitHub issues, so I need to commit this file to the repo.
1 parent 3bd12fb commit 12a2927

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

index.html

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8">
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
6+
<title>GitHub Page Testing</title>
7+
</head>
8+
<body>
9+
<pre id="result"></pre>
10+
11+
<script>
12+
async function fetchIssues() {
13+
const owner = 'HeyPuter';
14+
const repo = 'puter';
15+
16+
try {
17+
const response = await fetch(`https://api.github.com/repos/${owner}/${repo}/issues?state=all&per_page=100`);
18+
19+
if (!response.ok) {
20+
throw new Error(`HTTP error! Status: ${response.status}`);
21+
}
22+
23+
const issues = await response.json();
24+
25+
document.getElementById('result').textContent = JSON.stringify(issues, null, 2);
26+
} catch (error) {
27+
console.error('Error fetching issues:', error);
28+
document.getElementById('result').textContent = `Error: ${error.message}`;
29+
}
30+
}
31+
</script>
32+
</body>
33+
</html>

0 commit comments

Comments
 (0)