Created
January 13, 2022 04:40
-
-
Save mayel/4a6db0336d87a116a6b6224b2cf957bb to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<head> | |
<meta charset="utf-8"> | |
<title>Issue Example</title> | |
<link rel="stylesheet" href="css/styles.css?v=1.0"> | |
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous"> | |
<script src="https://code.jquery.com/jquery-3.4.1.min.js" crossorigin="anonymous"></script> | |
</head> | |
<body style="margin:50px;padding:25px"> | |
<h3>Issues in Repo</h3> | |
<table class="table table-striped"> | |
<thead> | |
<tr> | |
<th scope="col">Title</th> | |
<th scope="col">Issue #</th> | |
<!-- <th scope="col">Created</th> --> | |
<th scope="col">State</th> | |
<th scope="col">URL</th> | |
</tr> | |
</thead> | |
<tbody id="output-element"> | |
</tbody> | |
</table> | |
</body> | |
<script> | |
$(document).ready(function () { | |
$.ajax({ | |
url: `https://api.github.com/repos/bonfire-networks/bonfire-app/issues?state=all&per_page=100&milestone=11`, | |
type: "GET", | |
crossDomain: true, | |
success: function (response) { | |
tbody = ""; | |
response.forEach(issue => { | |
tbody += | |
`<tr> | |
<td>${issue.title}</td> | |
<td>${issue.number}</td> | |
<td>${issue.state}</td> | |
<td>${issue.html_url}</td> | |
</tr>`; | |
}); | |
$('#output-element').html(tbody); | |
}, | |
error: function (xhr, status) { | |
alert("error: " + JSON.stringify(xhr)); | |
} | |
}); | |
}); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment