-
Notifications
You must be signed in to change notification settings - Fork 79
Expand file tree
/
Copy pathgithub.js
More file actions
22 lines (19 loc) · 794 Bytes
/
github.js
File metadata and controls
22 lines (19 loc) · 794 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
var urlToGetAllOpenBugs = "https://api.github.com/search/issues?q=label:hackergarten+state:open&sort=updated";
$(document).ready(function () {
$.getJSON(urlToGetAllOpenBugs, function (allIssues) {
$.each(allIssues.items, function (i, issue) {
var repoName = issue.html_url;
repoName = repoName.replace("https://github.com/", "");
repoName = repoName.replace(/\/issues\/\d+/, "");
var title = issue.title;
title = sanitizeText(title);
$("#githubissues")
.append("<a href='" + issue.html_url + "'>" + title + "</a> <small>(" + repoName + ")</small><br/>")
});
});
function sanitizeText(chars) {
return filterXSS(chars, {
whiteList: []
});
}
});