Major Check in - Git and Recast Integrated, create repository and issue functional via UI

This commit is contained in:
2018-07-19 14:23:15 +05:30
parent a5996f1f2d
commit 76aca797d6
18 changed files with 2007 additions and 283 deletions

583
dist/bundle.js vendored

File diff suppressed because one or more lines are too long

2
dist/index.html vendored
View File

@@ -104,7 +104,7 @@
</div>
<nav class="navbar navbar-expand-lg navbar-light bg-light">
<div class="container-fluid">
<form onsubmit="processRequest();" class="navbar-form" role="search">
<form id="bot-cli" class="navbar-form" role="search">
<input type="text" class="form-control" placeholder="What you need..." name="command" id="command">
</form>
<div class="collapse navbar-collapse" id="navbarSupportedContent">

434
package-lock.json generated
View File

@@ -384,7 +384,6 @@
"version": "4.2.1",
"resolved": "https://registry.npmjs.org/agent-base/-/agent-base-4.2.1.tgz",
"integrity": "sha512-JVwXMr9nHYTUXsBFKUqhJwvlcYU/blreOEUkhNR2eXZIvwd+c+o5V4MgDPKWnMS/56awN3TRzIP+KoPn+roQtg==",
"dev": true,
"requires": {
"es6-promisify": "^5.0.0"
}
@@ -861,9 +860,7 @@
"ast-types": {
"version": "0.11.5",
"resolved": "https://registry.npmjs.org/ast-types/-/ast-types-0.11.5.tgz",
"integrity": "sha512-oJjo+5e7/vEc2FBK8gUalV0pba4L3VdBIs2EKhOLHLcOd2FgQIVQN9xb0eZ9IjEWyAL7vq6fGJxOvVvdCHNyMw==",
"dev": true,
"optional": true
"integrity": "sha512-oJjo+5e7/vEc2FBK8gUalV0pba4L3VdBIs2EKhOLHLcOd2FgQIVQN9xb0eZ9IjEWyAL7vq6fGJxOvVvdCHNyMw=="
},
"async": {
"version": "1.5.2",
@@ -1347,65 +1344,26 @@
"integrity": "sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA=="
},
"body-parser": {
"version": "1.18.2",
"resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.18.2.tgz",
"integrity": "sha1-h2eKGdhLR9hZuDGZvVm84iKxBFQ=",
"version": "1.18.3",
"resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.18.3.tgz",
"integrity": "sha1-WykhmP/dVTs6DyDe0FkrlWlVyLQ=",
"requires": {
"bytes": "3.0.0",
"content-type": "~1.0.4",
"debug": "2.6.9",
"depd": "~1.1.1",
"http-errors": "~1.6.2",
"iconv-lite": "0.4.19",
"depd": "~1.1.2",
"http-errors": "~1.6.3",
"iconv-lite": "0.4.23",
"on-finished": "~2.3.0",
"qs": "6.5.1",
"raw-body": "2.3.2",
"type-is": "~1.6.15"
"qs": "6.5.2",
"raw-body": "2.3.3",
"type-is": "~1.6.16"
},
"dependencies": {
"iconv-lite": {
"version": "0.4.19",
"resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.19.tgz",
"integrity": "sha512-oTZqweIP51xaGPI4uPa56/Pri/480R+mo7SeU+YETByQNhDG55ycFyNLIgta9vXhILrxXDmF7ZGhqZIcuN0gJQ=="
},
"qs": {
"version": "6.5.1",
"resolved": "https://registry.npmjs.org/qs/-/qs-6.5.1.tgz",
"integrity": "sha512-eRzhrN1WSINYCDCbrz796z37LOe3m5tmW7RQf6oBntukAG1nmovJvhnwHHRMAfeoItc1m2Hk02WER2aQ/iqs+A=="
},
"raw-body": {
"version": "2.3.2",
"resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.3.2.tgz",
"integrity": "sha1-vNYMd9Prk83gBQKVw/N5OJvIj4k=",
"requires": {
"bytes": "3.0.0",
"http-errors": "1.6.2",
"iconv-lite": "0.4.19",
"unpipe": "1.0.0"
},
"dependencies": {
"depd": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/depd/-/depd-1.1.1.tgz",
"integrity": "sha1-V4O04cRZ8G+lyif5kfPQbnoxA1k="
},
"http-errors": {
"version": "1.6.2",
"resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.2.tgz",
"integrity": "sha1-CgAsyFcHGSp+eUbO7cERVfYOxzY=",
"requires": {
"depd": "1.1.1",
"inherits": "2.0.3",
"setprototypeof": "1.0.3",
"statuses": ">= 1.3.1 < 2"
}
}
}
},
"setprototypeof": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.0.3.tgz",
"integrity": "sha1-ZlZ+NwQ+608E2RvWWMDL77VbjgQ="
"version": "6.5.2",
"resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz",
"integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA=="
}
}
},
@@ -2548,6 +2506,11 @@
"resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz",
"integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw="
},
"cookiejar": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/cookiejar/-/cookiejar-2.1.2.tgz",
"integrity": "sha512-Mw+adcfzPxcPeI+0WlvRrr/3lGVO0bD75SxX6811cxSh1Wbxx7xZBGK1eVtDf6si8rg2lhnUjsVLMFMfbRIuwA=="
},
"copy-concurrently": {
"version": "1.0.5",
"resolved": "https://registry.npmjs.org/copy-concurrently/-/copy-concurrently-1.0.5.tgz",
@@ -2796,9 +2759,7 @@
"data-uri-to-buffer": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-1.2.0.tgz",
"integrity": "sha512-vKQ9DTQPN1FLYiiEEOQ6IBGFqvjCa5rSK3cWMy/Nespm5d/x3dGFT9UBZnkLxCwua/IXBi2TYnwTEpsOvhC4UQ==",
"dev": true,
"optional": true
"integrity": "sha512-vKQ9DTQPN1FLYiiEEOQ6IBGFqvjCa5rSK3cWMy/Nespm5d/x3dGFT9UBZnkLxCwua/IXBi2TYnwTEpsOvhC4UQ=="
},
"date-format": {
"version": "1.2.0",
@@ -2891,9 +2852,7 @@
"deep-is": {
"version": "0.1.3",
"resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz",
"integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=",
"dev": true,
"optional": true
"integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ="
},
"default-compare": {
"version": "1.0.0",
@@ -2980,8 +2939,6 @@
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/degenerator/-/degenerator-1.0.4.tgz",
"integrity": "sha1-/PSQo37OJmRk2cxDGrmMWBnO0JU=",
"dev": true,
"optional": true,
"requires": {
"ast-types": "0.x.x",
"escodegen": "1.x.x",
@@ -2991,9 +2948,7 @@
"esprima": {
"version": "3.1.3",
"resolved": "https://registry.npmjs.org/esprima/-/esprima-3.1.3.tgz",
"integrity": "sha1-/cpRzuYTOJXjyI1TXOSdv/YqRjM=",
"dev": true,
"optional": true
"integrity": "sha1-/cpRzuYTOJXjyI1TXOSdv/YqRjM="
}
}
},
@@ -3506,14 +3461,12 @@
"es6-promise": {
"version": "4.2.4",
"resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.4.tgz",
"integrity": "sha512-/NdNZVJg+uZgtm9eS3O6lrOLYmQag2DjdEXuPaHlZ6RuVqgqaVZfgYCepEIKsLqwdQArOPtC3XzRLqGGfT8KQQ==",
"dev": true
"integrity": "sha512-/NdNZVJg+uZgtm9eS3O6lrOLYmQag2DjdEXuPaHlZ6RuVqgqaVZfgYCepEIKsLqwdQArOPtC3XzRLqGGfT8KQQ=="
},
"es6-promisify": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/es6-promisify/-/es6-promisify-5.0.0.tgz",
"integrity": "sha1-UQnWLz5W6pZ8S2NQWu8IKRyKUgM=",
"dev": true,
"requires": {
"es6-promise": "^4.0.3"
}
@@ -3552,8 +3505,6 @@
"version": "1.10.0",
"resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.10.0.tgz",
"integrity": "sha512-fjUOf8johsv23WuIKdNQU4P9t9jhQ4Qzx6pC2uW890OloK3Zs1ZAoCNpg/2larNF501jLl3UNy0kIRcF6VI22g==",
"dev": true,
"optional": true,
"requires": {
"esprima": "^3.1.3",
"estraverse": "^4.2.0",
@@ -3565,15 +3516,12 @@
"esprima": {
"version": "3.1.3",
"resolved": "https://registry.npmjs.org/esprima/-/esprima-3.1.3.tgz",
"integrity": "sha1-/cpRzuYTOJXjyI1TXOSdv/YqRjM=",
"dev": true,
"optional": true
"integrity": "sha1-/cpRzuYTOJXjyI1TXOSdv/YqRjM="
},
"source-map": {
"version": "0.6.1",
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
"integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
"dev": true,
"optional": true
}
}
@@ -3785,6 +3733,23 @@
"vary": "~1.1.2"
},
"dependencies": {
"body-parser": {
"version": "1.18.2",
"resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.18.2.tgz",
"integrity": "sha1-h2eKGdhLR9hZuDGZvVm84iKxBFQ=",
"requires": {
"bytes": "3.0.0",
"content-type": "~1.0.4",
"debug": "2.6.9",
"depd": "~1.1.1",
"http-errors": "~1.6.2",
"iconv-lite": "0.4.19",
"on-finished": "~2.3.0",
"qs": "6.5.1",
"raw-body": "2.3.2",
"type-is": "~1.6.15"
}
},
"finalhandler": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.1.tgz",
@@ -3799,11 +3764,50 @@
"unpipe": "~1.0.0"
}
},
"iconv-lite": {
"version": "0.4.19",
"resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.19.tgz",
"integrity": "sha512-oTZqweIP51xaGPI4uPa56/Pri/480R+mo7SeU+YETByQNhDG55ycFyNLIgta9vXhILrxXDmF7ZGhqZIcuN0gJQ=="
},
"qs": {
"version": "6.5.1",
"resolved": "https://registry.npmjs.org/qs/-/qs-6.5.1.tgz",
"integrity": "sha512-eRzhrN1WSINYCDCbrz796z37LOe3m5tmW7RQf6oBntukAG1nmovJvhnwHHRMAfeoItc1m2Hk02WER2aQ/iqs+A=="
},
"raw-body": {
"version": "2.3.2",
"resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.3.2.tgz",
"integrity": "sha1-vNYMd9Prk83gBQKVw/N5OJvIj4k=",
"requires": {
"bytes": "3.0.0",
"http-errors": "1.6.2",
"iconv-lite": "0.4.19",
"unpipe": "1.0.0"
},
"dependencies": {
"depd": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/depd/-/depd-1.1.1.tgz",
"integrity": "sha1-V4O04cRZ8G+lyif5kfPQbnoxA1k="
},
"http-errors": {
"version": "1.6.2",
"resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.2.tgz",
"integrity": "sha1-CgAsyFcHGSp+eUbO7cERVfYOxzY=",
"requires": {
"depd": "1.1.1",
"inherits": "2.0.3",
"setprototypeof": "1.0.3",
"statuses": ">= 1.3.1 < 2"
}
},
"setprototypeof": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.0.3.tgz",
"integrity": "sha1-ZlZ+NwQ+608E2RvWWMDL77VbjgQ="
}
}
},
"safe-buffer": {
"version": "5.1.1",
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz",
@@ -3927,9 +3931,7 @@
"fast-levenshtein": {
"version": "2.0.6",
"resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz",
"integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=",
"dev": true,
"optional": true
"integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc="
},
"fastparse": {
"version": "1.1.1",
@@ -3956,9 +3958,7 @@
"file-uri-to-path": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz",
"integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==",
"dev": true,
"optional": true
"integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw=="
},
"filename-regex": {
"version": "2.0.1",
@@ -4366,6 +4366,11 @@
"mime-types": "^2.1.12"
}
},
"formidable": {
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/formidable/-/formidable-1.2.1.tgz",
"integrity": "sha512-Fs9VRguL0gqGHkXS5GQiMCr1VhZBxz0JnJs4JmMp/2jL18Fmbzvv7vOFRU+U8TBkHEE/CX1qDXzJplVULgsLeg=="
},
"forwarded": {
"version": "0.1.2",
"resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.1.2.tgz",
@@ -4976,8 +4981,6 @@
"version": "0.3.10",
"resolved": "https://registry.npmjs.org/ftp/-/ftp-0.3.10.tgz",
"integrity": "sha1-kZfYYa2BQvPmPVqDv+TFn3MwiF0=",
"dev": true,
"optional": true,
"requires": {
"readable-stream": "1.1.x",
"xregexp": "2.0.0"
@@ -4986,16 +4989,12 @@
"isarray": {
"version": "0.0.1",
"resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz",
"integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=",
"dev": true,
"optional": true
"integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8="
},
"readable-stream": {
"version": "1.1.14",
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz",
"integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=",
"dev": true,
"optional": true,
"requires": {
"core-util-is": "~1.0.0",
"inherits": "~2.0.1",
@@ -5006,9 +5005,7 @@
"string_decoder": {
"version": "0.10.31",
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz",
"integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=",
"dev": true,
"optional": true
"integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ="
}
}
},
@@ -5086,8 +5083,6 @@
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/get-uri/-/get-uri-2.0.2.tgz",
"integrity": "sha512-ZD325dMZOgerGqF/rF6vZXyFGTAay62svjQIT+X/oU2PtxYpFxvSkbsdi+oxIrsNxlZVd4y8wUDqkaExWTI/Cw==",
"dev": true,
"optional": true,
"requires": {
"data-uri-to-buffer": "1",
"debug": "2",
@@ -5117,6 +5112,35 @@
}
}
},
"github-api": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/github-api/-/github-api-3.0.0.tgz",
"integrity": "sha1-KDL5jQ06g/FIXi2zLJJZ5LnECnU=",
"requires": {
"axios": "^0.15.2",
"debug": "^2.2.0",
"js-base64": "^2.1.9",
"utf8": "^2.1.1"
},
"dependencies": {
"axios": {
"version": "0.15.3",
"resolved": "https://registry.npmjs.org/axios/-/axios-0.15.3.tgz",
"integrity": "sha1-LJ1jiy4ZGgjqHWzJiOrda6W9wFM=",
"requires": {
"follow-redirects": "1.0.0"
}
},
"follow-redirects": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.0.0.tgz",
"integrity": "sha1-jjQpjL0uF28lTv/sdaHHjMhJ/Tc=",
"requires": {
"debug": "^2.2.0"
}
}
}
},
"glob": {
"version": "7.1.2",
"resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz",
@@ -6159,7 +6183,6 @@
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-2.1.0.tgz",
"integrity": "sha512-qwHbBLV7WviBl0rQsOzH6o5lwyOIvwp/BdFnvVxXORldu5TmjFfjzBcWUWS5kWAZhmv+JtiDhSuQCp4sBfbIgg==",
"dev": true,
"requires": {
"agent-base": "4",
"debug": "3.1.0"
@@ -6169,7 +6192,6 @@
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz",
"integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==",
"dev": true,
"requires": {
"ms": "2.0.0"
}
@@ -6529,7 +6551,6 @@
"version": "2.2.1",
"resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-2.2.1.tgz",
"integrity": "sha512-HPCTS1LW51bcyMYbxUIOO4HEOlQ1/1qRaFWcyxvwaqUS9TY88aoEuHUY33kuAh1YhVVaDQhLZsnPd+XNARWZlQ==",
"dev": true,
"requires": {
"agent-base": "^4.1.0",
"debug": "^3.1.0"
@@ -6539,7 +6560,6 @@
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz",
"integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==",
"dev": true,
"requires": {
"ms": "2.0.0"
}
@@ -8164,8 +8184,6 @@
"version": "0.3.0",
"resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz",
"integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=",
"dev": true,
"optional": true,
"requires": {
"prelude-ls": "~1.1.2",
"type-check": "~0.3.2"
@@ -9498,9 +9516,7 @@
"netmask": {
"version": "1.0.6",
"resolved": "https://registry.npmjs.org/netmask/-/netmask-1.0.6.tgz",
"integrity": "sha1-ICl+idhvb2QA8lDZ9Pa0wZRfzTU=",
"dev": true,
"optional": true
"integrity": "sha1-ICl+idhvb2QA8lDZ9Pa0wZRfzTU="
},
"next-tick": {
"version": "1.0.0",
@@ -9534,6 +9550,58 @@
"lower-case": "^1.1.1"
}
},
"nock": {
"version": "8.2.2",
"resolved": "https://registry.npmjs.org/nock/-/nock-8.2.2.tgz",
"integrity": "sha512-f4s5qR4Eg/NgaLuBYTThc/abl5mohCgIvnGdHkoqR5WgRe5amjFQTU2aia085OE8o3OAY7ZerDkRAeXfR720TA==",
"requires": {
"chai": ">=1.9.2 <4.0.0",
"debug": "^2.2.0",
"deep-equal": "^1.0.0",
"json-stringify-safe": "^5.0.1",
"lodash": "~4.9.0",
"mkdirp": "^0.5.0",
"propagate": "0.4.0",
"qs": "^6.0.2"
},
"dependencies": {
"chai": {
"version": "3.5.0",
"resolved": "https://registry.npmjs.org/chai/-/chai-3.5.0.tgz",
"integrity": "sha1-TQJjewZ/6Vi9v906QOxW/vc3Mkc=",
"requires": {
"assertion-error": "^1.0.1",
"deep-eql": "^0.1.3",
"type-detect": "^1.0.0"
}
},
"deep-eql": {
"version": "0.1.3",
"resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-0.1.3.tgz",
"integrity": "sha1-71WKyrjeJSBs1xOQbXTlaTDrafI=",
"requires": {
"type-detect": "0.1.1"
},
"dependencies": {
"type-detect": {
"version": "0.1.1",
"resolved": "https://registry.npmjs.org/type-detect/-/type-detect-0.1.1.tgz",
"integrity": "sha1-C6XsKohWQORw6k6FBZcZANrFiCI="
}
}
},
"lodash": {
"version": "4.9.0",
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.9.0.tgz",
"integrity": "sha1-TCDXQvA86F3HAODderm8q4Xm/BQ="
},
"type-detect": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/type-detect/-/type-detect-1.0.0.tgz",
"integrity": "sha1-diIXzAbbJY7EiQihKY6LlRIejqI="
}
}
},
"node-forge": {
"version": "0.7.5",
"resolved": "https://registry.npmjs.org/node-forge/-/node-forge-0.7.5.tgz",
@@ -10133,8 +10201,6 @@
"version": "0.8.2",
"resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.2.tgz",
"integrity": "sha1-NkxeQJ0/TWMB1sC0wFu6UBgK62Q=",
"dev": true,
"optional": true,
"requires": {
"deep-is": "~0.1.3",
"fast-levenshtein": "~2.0.4",
@@ -10147,9 +10213,7 @@
"wordwrap": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz",
"integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=",
"dev": true,
"optional": true
"integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus="
}
}
},
@@ -10242,8 +10306,6 @@
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/pac-proxy-agent/-/pac-proxy-agent-2.0.2.tgz",
"integrity": "sha512-cDNAN1Ehjbf5EHkNY5qnRhGPUCp6SnpyVof5fRzN800QV1Y2OkzbH9rmjZkbBRa8igof903yOnjIl6z0SlAhxA==",
"dev": true,
"optional": true,
"requires": {
"agent-base": "^4.2.0",
"debug": "^3.1.0",
@@ -10259,8 +10321,6 @@
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz",
"integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==",
"dev": true,
"optional": true,
"requires": {
"ms": "2.0.0"
}
@@ -10269,8 +10329,6 @@
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-3.0.1.tgz",
"integrity": "sha512-ZwEDymm204mTzvdqyUqOdovVr2YRd2NYskrYrF2LXyZ9qDiMAoFESGK8CRphiO7rtbo2Y757k2Nia3x2hGtalA==",
"dev": true,
"optional": true,
"requires": {
"agent-base": "^4.1.0",
"socks": "^1.1.10"
@@ -10282,8 +10340,6 @@
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/pac-resolver/-/pac-resolver-3.0.0.tgz",
"integrity": "sha512-tcc38bsjuE3XZ5+4vP96OfhOugrX+JcnpUbhfuc4LuXBLQhoTthOstZeoQJBDnQUDYzYmdImKsbz0xSl1/9qeA==",
"dev": true,
"optional": true,
"requires": {
"co": "^4.6.0",
"degenerator": "^1.0.4",
@@ -10732,8 +10788,7 @@
"prelude-ls": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz",
"integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=",
"dev": true
"integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ="
},
"prepend-http": {
"version": "1.0.4",
@@ -10789,6 +10844,11 @@
"with-callback": "^1.0.2"
}
},
"propagate": {
"version": "0.4.0",
"resolved": "https://registry.npmjs.org/propagate/-/propagate-0.4.0.tgz",
"integrity": "sha1-8/zKCm/gZzanulcpZgaWF8EwtIE="
},
"protractor": {
"version": "5.3.2",
"resolved": "https://registry.npmjs.org/protractor/-/protractor-5.3.2.tgz",
@@ -10917,9 +10977,7 @@
"proxy-from-env": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.0.0.tgz",
"integrity": "sha1-M8UDmPcOp+uW0h97gXYwpVeRx+4=",
"dev": true,
"optional": true
"integrity": "sha1-M8UDmPcOp+uW0h97gXYwpVeRx+4="
},
"prr": {
"version": "1.0.1",
@@ -11169,6 +11227,45 @@
"set-immediate-shim": "^1.0.1"
}
},
"recastai": {
"version": "3.7.0",
"resolved": "https://registry.npmjs.org/recastai/-/recastai-3.7.0.tgz",
"integrity": "sha512-w4MNt1+l28B3OQIsBfR5maxXeC1AaKoz196ypNnXyn70Y90GbThQNjbS652BcDyMNuGwExDbhm6wsjPIX7Ozuw==",
"requires": {
"babel-runtime": "^6.22.0",
"form-data": "^1.0.1",
"lodash": "^4.12.0",
"nock": "^8.0.0",
"superagent": "^2.3.0",
"superagent-promise": "^1.1.0",
"superagent-proxy": "^1.0.1"
},
"dependencies": {
"async": {
"version": "2.6.1",
"resolved": "https://registry.npmjs.org/async/-/async-2.6.1.tgz",
"integrity": "sha512-fNEiL2+AZt6AlAw/29Cr0UDe4sRAHCpEHh54WMz+Bb7QfNcFw4h3loofyJpLeQs4Yx7yuqu/2dLgM5hKOs6HlQ==",
"requires": {
"lodash": "^4.17.10"
}
},
"form-data": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/form-data/-/form-data-1.0.1.tgz",
"integrity": "sha1-rjFduaSQf6BlUCMEpm13M0de43w=",
"requires": {
"async": "^2.0.1",
"combined-stream": "^1.0.5",
"mime-types": "^2.1.11"
}
},
"lodash": {
"version": "4.17.10",
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.10.tgz",
"integrity": "sha512-UejweD1pDoXu+AD825lWwp4ZGtSwgnpZxb3JDViD7StjQz+Nb/6l093lx4OQ0foGWNRoc19mWy7BzL+UAK2iVg=="
}
}
},
"rechoir": {
"version": "0.6.2",
"resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz",
@@ -12739,9 +12836,7 @@
"smart-buffer": {
"version": "1.1.15",
"resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-1.1.15.tgz",
"integrity": "sha1-fxFLW2X6s+KjWqd1uxLw0cZJvxY=",
"dev": true,
"optional": true
"integrity": "sha1-fxFLW2X6s+KjWqd1uxLw0cZJvxY="
},
"smtp-connection": {
"version": "2.12.0",
@@ -13012,8 +13107,6 @@
"version": "1.1.10",
"resolved": "https://registry.npmjs.org/socks/-/socks-1.1.10.tgz",
"integrity": "sha1-W4t/x8jzQcU+0FbpKbe/Tei6e1o=",
"dev": true,
"optional": true,
"requires": {
"ip": "^1.1.4",
"smart-buffer": "^1.0.13"
@@ -13414,6 +13507,83 @@
"minimist": "^1.1.0"
}
},
"superagent": {
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/superagent/-/superagent-2.3.0.tgz",
"integrity": "sha1-cDUpoHFOV+EjlZ3e+84ZOy5Q0RU=",
"requires": {
"component-emitter": "^1.2.0",
"cookiejar": "^2.0.6",
"debug": "^2.2.0",
"extend": "^3.0.0",
"form-data": "1.0.0-rc4",
"formidable": "^1.0.17",
"methods": "^1.1.1",
"mime": "^1.3.4",
"qs": "^6.1.0",
"readable-stream": "^2.0.5"
},
"dependencies": {
"form-data": {
"version": "1.0.0-rc4",
"resolved": "https://registry.npmjs.org/form-data/-/form-data-1.0.0-rc4.tgz",
"integrity": "sha1-BaxrwiIntD5EYfSIFhVUaZ1Pi14=",
"requires": {
"async": "^1.5.2",
"combined-stream": "^1.0.5",
"mime-types": "^2.1.10"
}
}
}
},
"superagent-promise": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/superagent-promise/-/superagent-promise-1.1.0.tgz",
"integrity": "sha1-uvIti73UOamwfdEPjAj1T+JQNTM="
},
"superagent-proxy": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/superagent-proxy/-/superagent-proxy-1.0.3.tgz",
"integrity": "sha512-79Ujg1lRL2ICfuHUdX+H2MjIw73kB7bXsIkxLwHURz3j0XUmEEEoJ+u/wq+mKwna21Uejsm2cGR3OESA00TIjA==",
"requires": {
"debug": "^3.1.0",
"proxy-agent": "2"
},
"dependencies": {
"debug": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz",
"integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==",
"requires": {
"ms": "2.0.0"
}
},
"proxy-agent": {
"version": "2.3.1",
"resolved": "https://registry.npmjs.org/proxy-agent/-/proxy-agent-2.3.1.tgz",
"integrity": "sha512-CNKuhC1jVtm8KJYFTS2ZRO71VCBx3QSA92So/e6NrY6GoJonkx3Irnk4047EsCcswczwqAekRj3s8qLRGahSKg==",
"requires": {
"agent-base": "^4.2.0",
"debug": "^3.1.0",
"http-proxy-agent": "^2.1.0",
"https-proxy-agent": "^2.2.1",
"lru-cache": "^4.1.2",
"pac-proxy-agent": "^2.0.1",
"proxy-from-env": "^1.0.0",
"socks-proxy-agent": "^3.0.0"
}
},
"socks-proxy-agent": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-3.0.1.tgz",
"integrity": "sha512-ZwEDymm204mTzvdqyUqOdovVr2YRd2NYskrYrF2LXyZ9qDiMAoFESGK8CRphiO7rtbo2Y757k2Nia3x2hGtalA==",
"requires": {
"agent-base": "^4.1.0",
"socks": "^1.1.10"
}
}
}
},
"supports-color": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz",
@@ -13526,9 +13696,7 @@
"thunkify": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/thunkify/-/thunkify-2.1.2.tgz",
"integrity": "sha1-+qDp0jDFGsyVyhOjYawFyn4EVT0=",
"dev": true,
"optional": true
"integrity": "sha1-+qDp0jDFGsyVyhOjYawFyn4EVT0="
},
"thunky": {
"version": "1.0.2",
@@ -13750,7 +13918,6 @@
"version": "0.3.2",
"resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz",
"integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=",
"dev": true,
"requires": {
"prelude-ls": "~1.1.2"
}
@@ -14172,6 +14339,11 @@
}
}
},
"utf8": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/utf8/-/utf8-2.1.2.tgz",
"integrity": "sha1-H6DZJw6b6FDZsFAn9jUZv0ZFfZY="
},
"util": {
"version": "0.10.4",
"resolved": "https://registry.npmjs.org/util/-/util-0.10.4.tgz",
@@ -16185,9 +16357,7 @@
"xregexp": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/xregexp/-/xregexp-2.0.0.tgz",
"integrity": "sha1-UqY+VsoLhKfzpfPWGHLxJq16WUM=",
"dev": true,
"optional": true
"integrity": "sha1-UqY+VsoLhKfzpfPWGHLxJq16WUM="
},
"xrs": {
"version": "1.2.2",

View File

@@ -27,10 +27,13 @@
"dependencies": {
"babel-core": "^6.26.3",
"babel-loader": "^7.1.5",
"body-parser": "^1.18.3",
"bootstrap": "4.1.1",
"bootswatch": "^4.1.1",
"browser-sync": "^2.24.5",
"css-loader": "^1.0.0",
"express": "^4.16.3",
"github-api": "^3.0.0",
"gulp": "^4.0.0",
"gulp-sass": "^4.0.1",
"html-webpack-plugin": "^3.2.0",
@@ -39,6 +42,7 @@
"octonode": "^0.9.2",
"popper": "1.0.1",
"raw-loader": "^0.5.1",
"recastai": "^3.7.0",
"sass": "1.9.0",
"sass-loader": "^7.0.3",
"style-loader": "^0.21.0",

View File

@@ -5,7 +5,7 @@
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Webpack</title>
<title>Microbot</title>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.2/css/bootstrap.min.css" crossorigin="anonymous">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Poppins:300,400,500,600,700">
@@ -14,9 +14,10 @@
</head>
<body>
<h2 id="microbot-body" style="display:none">Micorbot Body</h2>
<div class="wrapper">
<!-- Sidebar -->
<nav id="sidebar">
<nav id="sidebar" class="active">
<div class="sidebar-header">
<button type="button" id="sidebarCollapse" class="btn btn-info">
@@ -31,28 +32,17 @@
<!-- data-toggle="collapse" -->
<a href="#homeSubmenu">
<i class="fas fa-home"></i>
<span class="hideable">Home</span>
<span class="hideable hide">Home</span>
</a>
<!-- <ul class="collapse list-unstyled" id="homeSubmenu">
<li>
<a href="#">Home 1</a>
</li>
<li>
<a href="#">Home 2</a>
</li>
<li>
<a href="#">Home 3</a>
</li>
</ul> -->
</li>
<li>
<a href="#">
<i class="fas fa-briefcase"></i>
<span class="hideable">About</span>
<span class="hideable hide">About</span>
</a>
<a href="#pageSubmenu" data-toggle="collapse" aria-expanded="false" class="dropdown-toggle">
<i class="fas fa-copy"></i>
<span class="hideable">Tasks</span>
<span class="hideable hide">Tasks</span>
</a>
<ul class="collapse list-unstyled" id="pageSubmenu">
<li>
@@ -69,19 +59,19 @@
<li>
<a href="#">
<i class="fas fa-image"></i>
<span class="hideable">Favorites</span>
<span class="hideable hide">Favorites</span>
</a>
</li>
<li>
<a href="#">
<i class="fas fa-question"></i>
<span class="hideable">FAQ</span>
<span class="hideable hide">FAQ</span>
</a>
</li>
<li>
<a href="#">
<i class="fas fa-paper-plane"></i>
<span class="hideable">Contact</span>
<span class="hideable hide">Contact</span>
</a>
</li>
</ul>
@@ -104,9 +94,7 @@
</div>
<nav class="navbar navbar-expand-lg navbar-light bg-light">
<div class="container-fluid">
<form onsubmit="processRequest();" class="navbar-form" role="search">
<input type="text" class="form-control" placeholder="What you need..." name="command" id="command">
</form>
<input type="text" class="form-control" placeholder="What you need..." name="command" id="command">
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="nav navbar-nav ml-auto">
<li class="nav-item">
@@ -129,71 +117,122 @@
</div>
</nav>
</div>
<div>
<h2>Placeholder header</h2>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore
magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea
commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat
nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit
anim id est laborum.</p>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore
magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea
commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat
nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit
anim id est laborum.</p>
<div class="alert alert-success alert-dismissible fade show hide good" id="successAlert" role="alert">
<strong>Success! </strong><span id="op-msg"> Repository Added!</span>
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="alert alert-danger alert-dismissible hide good" role="alert">
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
<strong>Oh snap!</strong> Change a few things up and try submitting again.
</div>
<div class="line"></div>
<h2>Lorem Ipsum Dolor</h2>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore
magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.
Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
<div class="line"></div>
<h2>Lorem Ipsum Dolor</h2>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore
magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.
Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
<div class="line"></div>
<h3>Lorem Ipsum Dolor</h3>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore
magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.
Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
<!-- Widgets -->
<div class="card-group" id="widgets">
<div class="card hide widget good" id="createissue">
<!-- <img class="card-img-top" src="..." alt="Card image cap"> -->
<div class="card-body">
<h5 class="card-title">Create Issue</h5>
<form>
<div class="form-row">
<div class="form-group col-md-12 col-sm-12 col-lg-12 col-xs-12 mb-3">
<label for="issueName">Issue Title</label>
<input type="text" class="form-control" id="issueName" placeholder="Issue name" required>
</div>
</div>
<div class="form-row">
<div class="form-group col-md-6 col-sm-6 col-lg-6 col-xs-6 mb-3">
<label for="assignees">assignees</label>
<input type="text" class="form-control" id="assignees" placeholder="Comma separated user IDs">
</div>
<div class="form-group col-md-6 col-sm-6 col-lg-6 col-xs-6 mb-3">
<label for="labels">Issue Labels</label>
<input type="text" class="form-control" id="labels" placeholder="Comma Separated Labels">
</div>
</div>
<div class="form-group">
<label for="description">Issue Description:</label>
<textarea class="form-control" rows="3" id="description"></textarea>
</div>
<button class="btn btn-primary" type="submit" data-toggle="modal" data-target="#exampleModalCenter">Submit</button>
</form>
</div>
</div>
</div>
<div class="modal" id="submitConfirm" tabindex="-1" role="dialog" aria-labelledby="exampleModalCenterTitle" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalCenterTitle">Confirm!</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
Are you sure you want to submit?
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Cancel</button>
<button id="submitGitData" type="button" class="btn btn-primary">Submit</button>
</div>
</div>
</div>
</div>
<div class="modal fade" id="emptyCommandMessageModal" tabindex="-1" role="dialog" aria-labelledby="emptyCommandMessageModalTitle"
aria-hidden="true">
<div class="modal-dialog modal-dialog-centered" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="emptyCommandMessageModalTitle">No Command!</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
Please type some relevant words in the command box.
</div>
<div class="modal-footer">
<button type="button" class="btn btn-primary">OK</button>
</div>
</div>
</div>
</div>
<button style="display: none" type="submit" data-toggle="modal" data-target="#emptyCommandMessageModal"></button>
<div class="card-group">
<div class="card">
<!-- <img class="card-img-top" src="..." alt="Card image cap"> -->
<div class="card-body">
<h5 class="card-title">Card title</h5>
<p class="card-text">This card has supporting text below as a natural lead-in to additional content.</p>
</div>
<div class="card-footer">
<small class="text-muted">Commanded 1 mins ago</small>
</div>
</div>
<div class="line"></div>
<div class="card">
<!-- <img class="card-img-top" src="..." alt="Card image cap"> -->
<div class="card-body">
<h5 class="card-title">Card title</h5>
<p class="card-text">This is a wider card with supporting text below as a natural lead-in to additional content. This
card has even longer content than the first to show that equal height action.</p>
</div>
<div class="card-footer">
<small class="text-muted">Commanded 3 mins ago</small>
</div>
</div>
</div>
</div>
</div>
<!-- jQuery CDN - Slim version (=without AJAX) -->
<script src="https://code.jquery.com/jquery-3.3.1.js" integrity="sha256-2Kok7MbOyxpgUVvAk/HJ2jigOSYS2auK4Pfzbm7uH60=" crossorigin="anonymous"></script>
<!-- Popper.JS -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.0/umd/popper.min.js" integrity="sha384-cs/chFZiN24E4KMATLdqdvsezGxaGsi4hLGOzlXwp5UZB1LY//20VyM2taTB4QvJ"
crossorigin="anonymous"></script>
<!-- Bootstrap JS -->
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.2/js/bootstrap.min.js" crossorigin="anonymous"></script>
<script>
$(document).ready(function () {
$('#sidebarCollapse').on('click', function () {
$('#sidebar').toggleClass('active');
$('.hideable').toggleClass('hide');
});
$('#content nav div.collapse li a.nav-link i.far.fa-star').hover(function () {
$('#content nav div.collapse li a.nav-link i.far.fa-star').toggleClass('fas');
});
$('#content nav div.collapse li a.nav-link i.far.fa-trash-alt').hover(function () {
$('#content nav div.collapse li a.nav-link i.far.fa-trash-alt').toggleClass('fas');
});
$('#content nav div.collapse li a.nav-link i.far.fa-paper-plane').hover(function () {
$('#content nav div.collapse li a.nav-link i.far.fa-paper-plane').toggleClass('fas');
});
});
</script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jstree/3.3.5/jstree.min.js"></script>
</body>
</html>

View File

@@ -7,6 +7,6 @@
<title>Document</title>
</head>
<body id="login">
<a href="https://github.com/login/oauth/authorize?scope=user:email:repo&client_id=f6f649a1fe2dfea082ba">Click here</a> to begin!</a>
<a href="https://github.com/login/oauth/authorize?scope=user:email:repo&client_id=f6f649a1fe2dfea082ba">Click here</a> to begin!
</body>
</html>

View File

@@ -1,41 +1,19 @@
import './../styles/scss/base.scss';
import './../styles/css/base.css';
import { parseWebDriverCommand } from '../../node_modules/blocking-proxy/built/lib/webdriver_commands';
const Microbot = require("./microbot-ops.js");
const app = new Microbot();
document.write('<h1>' + app.createRepository() + '</h1>');
require('./event-toggles.js');
var getUrlParameter = function getUrlParameter(sParam) {
var sPageURL = decodeURIComponent(window.location.search.substring(1)),
sURLVariables = sPageURL.split('&'),
sParameterName,
i;
// var getUrlParameter = function getUrlParameter(sParam) {
// var sPageURL = decodeURIComponent(window.location.search.substring(1)),
// sURLVariables = sPageURL.split('&'),
// sParameterName,
// i;
for (i = 0; i < sURLVariables.length; i++) {
sParameterName = sURLVariables[i].split('=');
// for (i = 0; i < sURLVariables.length; i++) {
// sParameterName = sURLVariables[i].split('=');
if (sParameterName[0] === sParam) {
return sParameterName[1] === undefined ? true : sParameterName[1];
}
}
};
// window.onload = function() {
// var code = getUrlParameter('code');
// console.log(code)
// if(code !== undefined) {
// var result = $.ajax({
// type: "POST",
// url: 'https://github.com/login/oauth/access_token',
// data: {
// client_id: app.clientId,
// client_secret: app.clientSecret,
// code: code
// }
// });
// // alert(JSON.stringify(result));
// if (sParameterName[0] === sParam) {
// return sParameterName[1] === undefined ? true : sParameterName[1];
// }
// }
// //access_token = JSON.parse(result)['access_token']
// return code;
// };

57
src/js/bot/bot.js Normal file
View File

@@ -0,0 +1,57 @@
/*
* bot.js
*
* In this file:
* - received message from a connected channel will be transformed with Recast.AI SDK
* - received message from test command will be processed by Recast.AI
* You can run this command for testing:
* curl -X "POST" "http://localhost:5000" -d '{"text": "YOUR_TEXT"}' -H "Content-Type: application/json; charset=utf-8"
*
*
* The Recast.AI SDK will handle the message and call your reply bot function (ie. replyMessage function)
*/
const recastai = require('recastai').default
const config = require('./config.js');
// Instantiate Recast.AI SDK
const client = new recastai(config.recasttoken);
/*
* Callback for BotConnector messages
* Parameters:
* - message: Message received from BotConnector
*/
const replyMessage = message => {
// Get text from message received
const text = message.content
console.log('I receive: ', text)
return client.request.analyseText(text)
.then(nlp => {
let reply = 'I\'m sorry but I don\'t understand what you are talking about.'
const intent = nlp.intent()
if (intent) {
reply = `I understand that you talk about ${intent.slug}.`
}
message.addReply({ type: 'text', content: reply })
return message.reply().then(p => p.body)
})
}
/*
* Main bot function
* Parameters are:
* - body: Request body
* - response: Response of your server (can be a blank object if not needed: {})
*/
const reply = (request, response) => {
return client.connect.handleMessage(request, response, replyMessage)
}
module.exports = {
reply,
}

3
src/js/bot/config.js Normal file
View File

@@ -0,0 +1,3 @@
module.exports = {
recasttoken: "26021d055040a9d9f1ad48476efab4a0"
}

88
src/js/bot/recast-ops.js Normal file
View File

@@ -0,0 +1,88 @@
const config = require('./config.js');
const Microbot = require("./../microbot-ops.js");
const app = new Microbot();
const DomManipulator = require('./../dom-ops.js');
const domManipulator = new DomManipulator();
module.exports = class Recast {
constructor() {
this.recastToken = config.recasttoken;
this.requestUrl = "https://api.recast.ai/v2/request";
}
getAndCallProcessIntent(command, text) {
self = this;
var url = this.requestUrl + "?text=" + command;
var bodyRelevant = '';
var intent = '';
fetch(url, {
method: "POST",
headers: {
"Content-Type": "application/json; charset=utf-8",
"Authorization": "Token " + this.recastToken
},
data: text
})
.then(function(response) {
response.json().then(function(body) {
bodyRelevant = body.results;
intent = bodyRelevant.intents[0]["slug"];
if(intent !== undefined) {
domManipulator.showWidget(intent);
domManipulator.populateRecastData(intent, bodyRelevant);
// self.processIntent(intent);
}
return intent;
});
})
.catch(function(error) {
console.error('Fetch Error =\n', error);
});
};
processIntent(intent) {
switch(intent) {
case "createrepo":
app.createRepository();
break;
case "updaterepo":
app.updateRepository();
break;
case "viewrepos":
app.viewRepositories();
break;
case "deleterepo":
app.deleteRepository();
break;
case "createissue":
app.createIssue();
break;
case "updateissue":
app.updateIssue();
break;
case "closeissue":
app.closeIssue();
break;
case "reopenissue":
app.reopenIssue();
break;
case "displayissue":
app.displayIssue();
break;
case "addissuecomment":
app.addIssueComment();
break;
case "displaylastcomment":
app.displayLastComment();
break;
case "addcollab":
app.addCollaborator();
break;
case "removecollab":
app.removeCollaborator();
break;
default:
console.log("default");
}
}
}

47
src/js/bot/server.js Normal file
View File

@@ -0,0 +1,47 @@
/*
* server.js
* This file is the core of your bot
*
* It creates a little server using express
* So, your bot can be triggered throught "/" route
*
* This file was made for locally testing your bot
* You can test it by running this command
* curl -X "POST" "http://localhost:5000" -d '{"text": "YOUR_TEXT"}' -H "Content-Type: application/json; charset=utf-8"
* You might modify the server port ^^^^ depending on your configuration in config.js file
*/
const express = require('express')
const bodyParser = require('body-parser')
// Load configuration
require('./config')
const bot = require('./bot')
// Start Express server
const app = express()
app.set('port', process.env.PORT || 5000)
app.use(bodyParser.json())
// Handle / route
app.use('/', (request, response) => {
bot.reply(request, response)
.then(success => {
console.log(success)
if (!response.headersSent) { response.status(200) }
}).catch(error => {
console.log('Error in your bot:', error)
if (!response.headersSent) { response.sendStatus(400) }
})
})
if (!process.env.REQUEST_TOKEN) {
console.log('ERROR: process.env.REQUEST_TOKEN variable in src/config.js file is empty ! You must fill this field with the request_token of your bot before launching your bot locally')
process.exit(0)
} else {
// Run Express server, on right port
app.listen(app.get('port'), () => {
console.log('Our bot is running on port', app.get('port'))
})
}

3
src/js/config.js Normal file
View File

@@ -0,0 +1,3 @@
module.exports = {
gitToken: "b5f624887b686467decb0b707521baa171308df4"
}

334
src/js/dom-ops.js Normal file
View File

@@ -0,0 +1,334 @@
module.exports = class DomManipulator {
constructor() {
this.createRepoWidgetCreated = false;
}
showWidget(widgetName) {
self = this;
switch(widgetName) {
case "createrepo":
self.showCreateRepoWidget();
break;
case "updaterepo":
app.updateRepository();
break;
case "viewrepos":
app.viewRepositories();
break;
case "deleterepo":
app.deleteRepository();
break;
case "createissue":
self.showCreateIssueWidget();
break;
case "updateissue":
app.updateIssue();
break;
case "closeissue":
app.closeIssue();
break;
case "reopenissue":
app.reopenIssue();
break;
case "displayissue":
app.displayIssue();
break;
case "addissuecomment":
app.addIssueComment();
break;
case "displaylastcomment":
app.displayLastComment();
break;
case "addcollab":
app.addCollaborator();
break;
case "removecollab":
app.removeCollaborator();
break;
default:
console.log("default");
}
}
showCreateRepoWidget() {
var createRepoWidget = self.createRepoWidget();
if(!this.isVisible(createRepoWidget)) {
createRepoWidget.classList.remove('hide');
}
}
showCreateIssueWidget() {
var createIssueWidget = document.getElementById('createissue');
if(!this.isVisible(createIssueWidget)) {
createIssueWidget.classList.remove('hide');
}
}
createRepoWidget() {
var existingWidget = document.getElementById('createrepo')
if(existingWidget) {
return existingWidget;
}
// Create Elements
var widgets = document.getElementById("widgets");
var createRepoWidget = document.createElement('div');
var cardBody = document.createElement('div');
var header = document.createElement('div');
var form = document.createElement('form');
var formRow1 = document.createElement('div');
var formGroup1_1 = document.createElement('div');
var repoNamelabel = document.createElement('label');
var repoNameTextField = document.createElement('input');
var formGroup1_2 = document.createElement('div');
var homePageURLLabel = document.createElement('label');
var homePageURLTextField = document.createElement('input');
var formRow2 = document.createElement('div');
var formGroup2_1 = document.createElement('div');
var formCheck1 = document.createElement('div');
var privateLabel = document.createElement('label');
var privateCB = document.createElement('input');
var formGroup2_2 = document.createElement('div');
var formCheck2 = document.createElement('div');
var addIssueLabel = document.createElement('label');
var addIssueCB = document.createElement('input');
var formGroup2_3 = document.createElement('div');
var formCheck3 = document.createElement('div');
var addWikiLabel = document.createElement('label');
var addWikiCB = document.createElement('input');
var formGroup3_1 = document.createElement('div');
var descriptionLabel = document.createElement('label');
var descriptionTextArea = document.createElement('textarea');
var submitRepoCreate = document.createElement('button')
var line = document.createElement('div');
// Add Attributes
widgets.classList.add('card-group');
createRepoWidget.setAttribute('id', 'createrepo');
createRepoWidget.classList.add('card', 'hide', 'widget', 'good');
cardBody.classList.add('card-body');
header.classList.add('card-title');
formRow1.classList.add('form-row');
formGroup1_1.classList.add('form-group', 'col-md-6', 'col-sm-6', 'col-lg-6', 'col-xs-6', 'mb-3');
repoNamelabel.setAttribute('for', 'repositoryName');
repoNameTextField.setAttribute('type', 'text');
repoNameTextField.setAttribute('id', 'repositoryName');
repoNameTextField.setAttribute('placeholder', 'Repository Name... ');
repoNameTextField.required = true;
repoNameTextField.classList.add('form-control');
formGroup1_2.classList.add('form-group', 'col-md-6', 'col-sm-6', 'col-lg-6', 'col-xs-6', 'mb-3');
homePageURLLabel.setAttribute('for', 'homePageURL');
homePageURLTextField.setAttribute('type', 'text');
homePageURLTextField.setAttribute('id', 'homePageURL');
homePageURLTextField.setAttribute('placeholder', 'Home Page URL... ');
homePageURLTextField.classList.add('form-control');
formRow2.classList.add('form-row');
formGroup2_1.classList.add('form-group', 'col-md-3', 'col-sm-3', 'col-lg-3', 'col-xs-3', 'mb-3');
formCheck1.classList.add('form-check', 'form-check-inline')
privateLabel.setAttribute('for', 'privateRepoChk');
privateLabel.classList.add('form-check-label');
privateCB.setAttribute('type', 'checkbox');
privateCB.setAttribute('id', 'privateRepoChk');
privateCB.setAttribute('value', 'Option 1');
privateCB.classList.add('form-check-input');
formGroup2_2.classList.add('form-group', 'col-md-4', 'col-sm-4', 'col-lg-4', 'col-xs-4', 'mb-3');
formCheck2.classList.add('form-check', 'form-check-inline')
addIssueLabel.setAttribute('for', 'issuesChk');
addIssueLabel.classList.add('form-check-label');
addIssueCB.setAttribute('type', 'checkbox');
addIssueCB.setAttribute('id', 'issuesChk');
addIssueCB.setAttribute('value', 'Option 2');
addIssueCB.classList.add('form-check-input');
formGroup2_3.classList.add('form-group', 'col-md-4', 'col-sm-4', 'col-lg-4', 'col-xs-4', 'mb-3');
formCheck3.classList.add('form-check', 'form-check-inline')
addWikiLabel.setAttribute('for', 'wikiChk');
addWikiLabel.classList.add('form-check-label');
addWikiCB.setAttribute('type', 'checkbox');
addWikiCB.setAttribute('id', 'wikiChk');
addWikiCB.setAttribute('value', 'Option 3');
addWikiCB.classList.add('form-check-input');
formGroup3_1.classList.add('form-group');
descriptionLabel.setAttribute('for', 'description');
descriptionTextArea.setAttribute('rows', '3');
descriptionTextArea.classList.add('form-control');
descriptionTextArea.setAttribute('id', 'description');
submitRepoCreate.setAttribute('type', 'button');
submitRepoCreate.setAttribute('data-toggle', 'modal');
submitRepoCreate.setAttribute('data-target', '#submitConfirm');
submitRepoCreate.setAttribute('id', 'submitForm');
submitRepoCreate.classList.add('btn', 'btn-primary');
line.classList.add('line');
line.setAttribute('id', 'underWidgetLine');
// Add inner HTML
header.innerHTML = "Create Repository";
repoNamelabel.innerHTML = "Repository Name";
homePageURLLabel.innerHTML = "Home Page URL";
privateLabel.innerHTML = "Private";
addIssueLabel.innerHTML = "Allow Adding Issues?";
addWikiLabel.innerHTML = "Add Wiki?";
descriptionLabel.innerHTML = "Add some Description for this repository:";
submitRepoCreate.innerHTML = "Submit";
// Associations
formCheck1.appendChild(privateCB);
formCheck1.appendChild(privateLabel);
formCheck2.appendChild(addIssueCB);
formCheck2.appendChild(addIssueLabel);
formCheck3.appendChild(addWikiCB);
formCheck3.appendChild(addWikiLabel);
formGroup1_1.appendChild(repoNamelabel);
formGroup1_1.appendChild(repoNameTextField);
formGroup1_2.appendChild(homePageURLLabel);
formGroup1_2.appendChild(homePageURLTextField);
formGroup2_1.appendChild(formCheck1);
formGroup2_2.appendChild(formCheck2);
formGroup2_3.appendChild(formCheck3);
formGroup3_1.appendChild(descriptionLabel);
formGroup3_1.appendChild(descriptionTextArea);
formRow1.appendChild(formGroup1_1);
formRow1.appendChild(formGroup1_2);
formRow2.appendChild(formGroup2_1);
formRow2.appendChild(formGroup2_2);
formRow2.appendChild(formGroup2_3);
form.appendChild(formRow1);
form.appendChild(formRow2);
form.appendChild(formGroup3_1);
form.appendChild(submitRepoCreate);
cardBody.appendChild(header);
cardBody.appendChild(form);
widgets.appendChild(createRepoWidget);
createRepoWidget.appendChild(cardBody);
widgets.appendChild(line);
this.createRepoWidgetCreated = true;
return createRepoWidget;
}
showEmptyCommandMessage() {
$('#emptyCommandMsgDisplayer').click();
}
populateWidgetWithRecastResponse() {
}
populateWidgetWithGithubResponse() {
}
populateRecastData(widgetName, recastResponse) {
switch(widgetName) {
case "createrepo":
self.populateCreateRepoData(recastResponse);
break;
case "updaterepo":
app.updateRepository();
break;
case "viewrepos":
app.viewRepositories();
break;
case "deleterepo":
app.deleteRepository();
break;
case "createissue":
app.createIssue();
break;
case "updateissue":
app.updateIssue();
break;
case "closeissue":
app.closeIssue();
break;
case "reopenissue":
app.reopenIssue();
break;
case "displayissue":
app.displayIssue();
break;
case "addissuecomment":
app.addIssueComment();
break;
case "displaylastcomment":
app.displayLastComment();
break;
case "addcollab":
app.addCollaborator();
break;
case "removecollab":
app.removeCollaborator();
break;
default:
console.log("default");
}
}
populateCreateRepoData(recastResponse) {
var repoNameTextField = document.getElementById('repositoryName');
if(repoNameTextField && recastResponse && recastResponse.entities['git-repository'] && recastResponse.entities['git-repository'].length > 0
&& recastResponse.entities['git-repository']['0']['value']) {
var repoName = recastResponse.entities['git-repository']['0']['value'];
repoNameTextField.value = repoName;
}
}
isVisible(element) {
return element ? !element.classList.contains('hide') : false;
}
getDataFromFormAsJSON() {
var request = {};
if(this.isVisible(document.getElementById("createrepo"))) {
request.name = document.getElementById("repositoryName").value;
request.description = document.getElementById("description").value;
request.homepage = document.getElementById("homePageURL").value;
request.private = document.getElementById("privateRepoChk").checked;
request.has_issues = document.getElementById("issuesChk").checked;
request.has_wiki = document.getElementById("wikiChk").checked;
}
return request;
}
addGitOperationHistory(response) {
}
toggleModals(response) {
var promise = response.json();
$('#submitConfirm').hide();
$('.modal-backdrop').removeClass('modal-backdrop');
$('#underWidgetLine').hide();
if(response && response.status && response.status === 201) {
$('#successAlert').show();
$('#createrepo').hide();
}
promise.then(function(body) {
addGitOperationHistory(body);
})
}
}

44
src/js/event-toggles.js Normal file
View File

@@ -0,0 +1,44 @@
const Recast = require('./bot/recast-ops.js');
const recastclient = new Recast();
const DomManipulator = require('./dom-ops.js');
const dom = new DomManipulator();
const Microbot = require('./microbot-ops.js');
const app = new Microbot();
module.exports = $(document).ready(function () {
$('#sidebarCollapse').on('click', function () {
$('#sidebar').toggleClass('active');
$('.hideable').toggleClass('hide');
});
$('#content nav div.collapse li a.nav-link i.far.fa-star').hover(function () {
$('#content nav div.collapse li a.nav-link i.far.fa-star').toggleClass('fas');
});
$('#content nav div.collapse li a.nav-link i.far.fa-trash-alt').hover(function () {
$('#content nav div.collapse li a.nav-link i.far.fa-trash-alt').toggleClass('fas');
});
$('#content nav div.collapse li a.nav-link i.far.fa-paper-plane').hover(function () {
$('#content nav div.collapse li a.nav-link i.far.fa-paper-plane').toggleClass('fas');
});
$('#command').keyup(function(e){
var code = (e.keyCode ? e.keyCode : e.which);
if(code == 13) {
$('widgets').children().hide();
var command = document.getElementById('command').value;
if(command) {
var text = { "text": command};
recastclient.getAndCallProcessIntent(command, text);
} else {
dom.showEmptyCommandMessage();
}
}
});
$('#submitGitData').on('click', function() {
var requestJSON = dom.getDataFromFormAsJSON();
app.createRepository(requestJSON);
})
$('#submitForm').click(function(e) {
e.preventDefault();
});
});

View File

@@ -1,42 +1,288 @@
const config = require('./config.js');
const GithubHelper = require('./helper.js');
const githubHelper = new GithubHelper();
const DomManipulator = require('./dom-ops.js');
const dom = new DomManipulator();
module.exports = class Github {
constructor() {
this.authorizationToken = "token " + config.gitToken;
}
getToken() {
}
createRepository(newRepoJson) {
$.ajax({
type: "POST",
headers: {'Authorization' : 'token bcce9020b0604acc8a535d6d0e026b04b4996432'},
url: "https://api.github.com/user/repos",
contentType: "application/json",
dataType: "jsonp",
data: newRepoJson
authenticate() {
}
viewRepositories() {
var repositories = '';
let url = 'https://api.github.com/user/repos';
fetch(url, {
method: "GET",
headers: {
"Content-Type": "application/json; charset=utf-8",
"Authorization": this.authorizationToken
}
}
)
.then(function(response) {
response.json().then(function(body){
repositories = body;
console.log(repositories);
return repositories;
});
})
.catch(error => console.error('Fetch Error =\n', error));
return repositories;
}
updateRepository(updateRepoJson) {
createRepository(newRepoJson) {
let url = 'https://api.github.com/user/repos';
var responsePromise = '';
fetch(url, {
method: "POST",
headers: {
"Content-Type": "application/json; charset=utf-8",
"Authorization": this.authorizationToken
},
body: JSON.stringify(newRepoJson)
}
)
.then(function(response) {
dom.toggleModals(response);
})
.catch(error => console.error('Fetch Error =\n', error));
}
deleteRepositoy(repoId) {
updateRepository(updateRepoJson, repoName) {
repoName = "Hello-World3";
let url = 'https://api.github.com/repos/mohiit1502/' + repoName;
fetch(url, {
method: "PATCH",
headers: {
"Content-Type": "application/json; charset=utf-8",
"Authorization": this.authorizationToken
},
body: JSON.stringify(updateRepoJson)
}
)
.then(response => response.json())
.catch(error => console.error('Fetch Error =\n', error));
}
deleteRepository(repoName) {
repoName = "Hello-World2";
let url = 'https://api.github.com/repos/mohiit1502/' + repoName;
fetch(url, {
method: "DELETE",
headers: {
"Content-Type": "application/json; charset=utf-8",
"Authorization": this.authorizationToken
}
}
)
.then(response => response.json())
.catch(error => console.error('Fetch Error =\n', error));
}
createIssue(newIssueJson) {
let url = 'https://api.github.com/repos/mohiit1502/stack_route_prj7/issues';
fetch(url, {
method: "POST",
headers: {
"Content-Type": "application/json; charset=utf-8",
"Authorization": this.authorizationToken
},
body: JSON.stringify(newIssueJson)
}
)
.then(response => response.json())
.catch(error => console.error('Fetch Error =\n', error));
}
updateIssue(updateIssueJson) {
updateIssue(updateIssueJson, repoName, issueNumber) {
repoName = 'stack_route_prj7';
issueNumber = 2;
let url = 'https://api.github.com/repos/mohiit1502/' + repoName + '/issues/' + issueNumber;
fetch(url, {
method: "PATCH",
headers: {
"Content-Type": "application/json; charset=utf-8",
"Authorization": this.authorizationToken
},
body: JSON.stringify(updateIssueJson)
}
)
.then(response => response.json())
.catch(error => console.error('Fetch Error =\n', error));
}
deleteIssue(issueId) {
closeIssue(closeIssueJson, repoName, issueNumber) {
repoName = 'stack_route_prj7';
issueNumber = 2;
let url = 'https://api.github.com/repos/mohiit1502/' + repoName + '/issues/' + issueNumber;
fetch(url, {
method: "PATCH",
headers: {
"Content-Type": "application/json; charset=utf-8",
"Authorization": this.authorizationToken
},
body: JSON.stringify(closeIssueJson)
}
)
.then(response => response.json())
.catch(error => console.error('Fetch Error =\n', error));
}
closeIssue(issueId) {
reopenIssue(reopenIssueJson, repoName, issueNumber) {
repoName = 'stack_route_prj7';
issueNumber = 2;
let url = 'https://api.github.com/repos/mohiit1502/' + repoName + '/issues/' + issueNumber;
fetch(url, {
method: "PATCH",
headers: {
"Content-Type": "application/json; charset=utf-8",
"Authorization": this.authorizationToken
},
body: JSON.stringify(reopenIssueJson)
}
)
.then(response => response.json())
.catch(error => console.error('Fetch Error =\n', error));
}
displayIssue(repoName, issueNumber) {
repoName = 'stack_route_prj7';
issueNumber = 2;
let url = 'https://api.github.com/repos/mohiit1502/' + repoName + '/issues/' + issueNumber;
var issues = '';
fetch(url, {
method: "GET",
headers: {
"Content-Type": "application/json; charset=utf-8",
"Authorization": this.authorizationToken
}
}
)
.then(function(response) {
response.json().then(function(body){
issues = body;
console.log(issues);
return issues;
});
})
.catch(error => console.error('Fetch Error =\n', error));
return issues;
}
addIssueComment(commentBodyJson, repoName, issueNumber) {
repoName = "stack_route_prj7";
issueNumber = 2;
let url = 'https://api.github.com/repos/mohiit1502/' + repoName + '/issues/' + issueNumber + "/comments";
fetch(url, {
method: "POST",
headers: {
"Content-Type": "application/json; charset=utf-8",
"Authorization": this.authorizationToken
},
body: JSON.stringify(commentBodyJson)
}
)
.then(response => response.json())
.catch(error => console.error('Fetch Error =\n', error));
}
displayLastComment(repoName, issueNumber) {
repoName = "stack_route_prj7";
issueNumber = 2;
let url = 'https://api.github.com/repos/mohiit1502/' + repoName + '/issues/' + issueNumber + "/comments";
var comments = [];
var latestComment = "";
fetch(url, {
method: "GET",
headers: {
"Content-Type": "application/json; charset=utf-8",
"Authorization": this.authorizationToken
}
}
)
.then(function(response) {
response.json().then(function(body){
comments = body;
latestComment = githubHelper.getLatestComment(comments);
console.log(comments);
console.log(latestComment);
return latestComment;
});
})
.catch(error => console.error('Fetch Error =\n', error));
}
displayIssuesForUser() {
let url = 'https://api.github.com/user/issues';
fetch(url, {
method: "GET",
headers: {
"Content-Type": "application/json; charset=utf-8",
"Authorization": this.authorizationToken
}
}
)
.then(response => response.json())
.catch(error => console.error('Fetch Error =\n', error));
}
displayIssuesOnRepo() {
repoName = 'stack_route_prj7';
issueNumber = 2;
let url = 'https://api.github.com/repos/mohiit1502/' + repoName + '/issues/';
fetch(url, {
method: "PATCH",
headers: {
"Content-Type": "application/json; charset=utf-8",
"Authorization": this.authorizationToken
},
body: JSON.stringify(updateIssueJson)
}
)
.then(response => response.json())
.catch(error => console.error('Fetch Error =\n', error));
}
addCollaborator(repoName, collaborator) {
repoName = 'stack_route_prj7';
collaborator = 'swat1508';
let url = 'https://api.github.com/repos/mohiit1502/' + repoName + '/collaborators/' + collaborator;
fetch(url, {
method: "PUT",
headers: {
"Content-Type": "application/json",
"Authorization": this.authorizationToken
}
}
)
.then(response => response.json())
.catch(error => console.error('Fetch Error =\n', error));
}
removeCollaborator(repoName, collaborator) {
repoName = 'stack_route_prj7';
collaborator = 'swat1508';
let url = 'https://api.github.com/repos/mohiit1502/' + repoName + '/collaborators/' + collaborator;
fetch(url, {
method: "DELETE",
headers: {
"Content-Type": "application/json",
"Authorization": this.authorizationToken
}
}
)
.then(response => response.json())
.catch(error => console.error('Fetch Error =\n', error));
}
createUser(newuserJson) {
@@ -48,14 +294,6 @@ module.exports = class Github {
}
deleteUser(userId) {
}
addCollaborator(userId, collaboratorId) {
}
removeCollaborator(userId, collaboratorId) {
}
}

6
src/js/helper.js Normal file
View File

@@ -0,0 +1,6 @@
module.exports = class GithubHelper {
getLatestComment(comments) {
if(comments && comments.length > 0)
return comments[comments.length - 1]['body'];
}
}

View File

@@ -2,26 +2,116 @@ const Github = require('./github-ops.js');
const $github = new Github()
module.exports = class Microbot {
constructor(clientId, clientSecret) {
// TODO move to config or env variables
this.clientId = 'f6f649a1fe2dfea082ba';
this.clientSecret = '7e9a33d05ffdb36b4a498140bb9bb06d62de4f0e';
}
createRepository(repoName, repoType) {
$github.createRepository({
"name": "first-js-git-api-repo",
"description": "This is your first repository",
viewRepositories() {
return $github.viewRepositories();
}
createRepository(requestJson) {
var promise = $github.createRepository(requestJson);
// $github.createRepository({
// "name": "new-test-js-git-api-repo",
// "description": "This is your first repository",
// "homepage": "https://github.com",
// "private": false,
// "has_issues": true,
// "has_wiki": true
// })
}
updateRepository(repoName, repoType) {
$github.authenticate();
$github.updateRepository({
"name": "Hello-World4",
"description": "This is your test description",
"homepage": "https://github.com",
"private": false,
"has_issues": true,
"has_projects": true,
"has_wiki": true
})
}
// testingWebpackcalls() {
deleteRepository() {
$github.deleteRepository();
}
// console.log('call successful');
// }
createIssue() {
$github.createIssue({
"title": "Found a bug",
"body": "I'm having a problem with this.",
"assignees": [
"mohiit1502"
],
"labels": [
"bug"
]
})
}
updateIssue() {
$github.updateIssue({
"title": "Found a bug - title updated",
"body": "This is the updated problem description.",
"assignees": [
"mohiit1502"
],
"milestone": 1,
"state": "open",
"labels": [
"bug", "issue"
]
});
}
closeIssue() {
$github.closeIssue({
"milestone": 1,
"state": "close",
});
}
displayIssue() {
return $github.displayIssue();
}
reopenIssue() {
$github.reopenIssue({
"milestone": 1,
"state": "open",
})
}
addIssueComment() {
$github.addIssueComment({
"body": "This is another test issue comment"
});
}
displayLastComment() {
return $github.displayLastComment();
}
addCollaborator() {
$github.addCollaborator({
"title": "Found a bug",
"body": "I'm having a problem with this.",
"assignees": [
"mohiit1502"
],
"labels": [
"bug"
]
});
}
removeCollaborator() {
$github.removeCollaborator();
}
}

View File

@@ -131,7 +131,7 @@ span {
#sidebar ul.components {
padding: 20px 0;
border-bottom: 1px solid #47748b;
border-bottom: 3px solid $themeColor-Dark;
}
#sidebar ul li a {
@@ -286,6 +286,25 @@ ADDITIONS
margin: auto;
}
.good {
animation: anim .3s ease-in-out;
}
@keyframes anim {
0% {
display: none;
opacity: 0;
}
1% {
display: block;
opacity: 0;
transform: scale(0);
}
100% {
opacity: 1;
transform: scale(1);
}
}
@keyframes blinkingText {
0%{ color: #000; }
49%{ color: transparent; }
@@ -308,6 +327,7 @@ ADDITIONS
font-size: 1.8em;
padding: 0.2em;
}
/* --------------------------------------------------
OVERRIDES
--------------------------------------------------*/
@@ -330,4 +350,30 @@ ADDITIONS
.container-fluid {
padding-left: 0.3em;
}
}
.card-group {
flex-direction:column;
}
#command.form-control {
width: 87%;
}
.ml-auto {
margin-left: 0!important;
}
@media(min-width: 576px) {
.card-group>.card:first-child {
border-top-right-radius: .25rem;
border-bottom-right-radius: .25rem;
}
.card-group>.card:not(:first-child):not(:last-child):not(:only-child) {
border-radius: .25rem;
}
.card-group>.card:last-child {
border-top-left-radius: .25rem;
border-bottom-left-radius: .25rem;
}
}