-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
58 lines (49 loc) · 1.58 KB
/
index.html
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
<!DOCTYPE html>
<html>
<head><title>GHStatus</title></head>
<body>
<script>
var apiLib = {
get: function (site,callback) {
var xhttp = new XMLHttpRequest();
xhttp.onreadystatechange = function() {
if (this.readyState == 4 && this.status == 200) {
callback(JSON.parse(this.responseText));
}
};
xhttp.open('GET', site, true);
xhttp.send();
}
};
var needed = [];
function ghStatus(user,repo) {
apiLib.get("https://api.github.com/repos/"+user+"/"+repo+"/issues", function(data) {
for(var i=0; i<data.length; i++) {
if(data[i].comments===0) {
needed.push(data[i].title+"~ needs attention ~"+user+" "+repo+" ");
}
console.log(data[i].comments);
// help wanted code next
var tags = data[i].labels;
var d = 0;
for(var aaa=0;aaa < tags.length; aaa++) {
if(tags[aaa].name==="help wanted"){
d++;
}
if(d!==0) {
needed.push(data[i].title+"~ help wanted ~"+user+" "+repo+" ");
}
}
}
console.log(data);
});
}
var datas = ["mountio.github.io","GHStatus","site-suggestions","scratch-archive", "sumbline", "sease", "prime", "find", "animate", "floss", "telegram", "spider-web-creator", "mountcdn", "mountiogame","mountio-host", "supersite", "app-maker", "mountaia", "mountio-promotions", "wander", "mmtusic", "mintio"];
for(var aa=0;aa<datas.length;aa++) {
ghStatus("Mountios",datas[aa]);
}
</script>
<div id="p" onclick="this.innerHTML=needed.join(' -~- ');">Click here to get data</div>
<a href="get">Get Your Own GHStatus</a>
</body>
</html>