File tree Expand file tree Collapse file tree 1 file changed +33
-0
lines changed Expand file tree Collapse file tree 1 file changed +33
-0
lines changed Original file line number Diff line number Diff line change 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 >
You can’t perform that action at this time.
0 commit comments