This repository has been archived by the owner on Dec 8, 2017. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
/
index.html
59 lines (50 loc) · 1.49 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
59
<!DOCTYPE html>
<html>
<head>
<title>hubot-slack-github-issues configuration validator</title>
<script>
var REPO = '18F/18f-bot';
var CONFIG_PATH = 'config/slack-github-issues.json';
var PREFILL_URL = 'https://raw.githubusercontent.com/' + REPO + '/master/' +
CONFIG_PATH;
var EDIT_URL = 'https://github.com/' + REPO + '/edit/master/' + CONFIG_PATH;
</script>
<style>
button {
font-size: 100%;
}
#config-input {
font-family: courier, monospace;
font-size: 80%;
}
#result-text {
display: inline-block;
vertical-align: top;
font-family: courier, monospace;
font-size: 80%;
}
</style>
</head>
<body>
<h1><code>hubot-slack-github-issues</code> configuration validator</h1>
<div id='description'></div>
<button onclick='validateConfig()'>Validate</button><br/>
<textarea id='config-input' rows='64' cols='80'></textarea>
<div id='result-text'></div>
</body>
<script src='config-validator.js'></script>
<script>
var prefillReq = new XMLHttpRequest();
prefillReq.addEventListener('load', function() {
document.getElementById('config-input').value = this.responseText;
});
prefillReq.open('GET', PREFILL_URL);
prefillReq.send();
document.getElementById('description').innerHTML = '<p>' +
'This is prefilled with the current content from <code>' + CONFIG_PATH +
'</code> within the ' + REPO + ' repository.</p>' +
'<p>When your updated configuration is ready, copy and paste it into the ' +
'<a href="' + EDIT_URL + '">GitHub editor</a> ' + 'to create a new pull ' +
'request.</p>';
</script>
</html>