Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

github-api

Package Overview
Dependencies
Maintainers
4
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github-api - npm Package Compare versions

Comparing version 2.0.0 to 2.1.0

dist/components/Team.js

16

CHANGELOG.md
# Change Log
## master
## 2.1.0
### Features
Team API
* `Organization.getTeams`
* `Team.getTeam`
* `Team.listRepos`
* `Team.editTeam`
* `Team.listMembers`
* `Team.getMembership`
* `Team.addMembership`
* `Team.isManagedRepo`
* `Team.manageRepo`
* `Team.unmanageRepo`
* `Team.deleteTeam`
### Fixes
## 2.0.0

@@ -9,0 +19,0 @@ ### Breaking

17

dist/components/GitHub.js
(function (global, factory) {
if (typeof define === "function" && define.amd) {
define(['module', './Gist', './User', './Issue', './Search', './RateLimit', './Repository', './Organization', './Markdown'], factory);
define(['module', './Gist', './User', './Issue', './Search', './RateLimit', './Repository', './Organization', './Team', './Markdown'], factory);
} else if (typeof exports !== "undefined") {
factory(module, require('./Gist'), require('./User'), require('./Issue'), require('./Search'), require('./RateLimit'), require('./Repository'), require('./Organization'), require('./Markdown'));
factory(module, require('./Gist'), require('./User'), require('./Issue'), require('./Search'), require('./RateLimit'), require('./Repository'), require('./Organization'), require('./Team'), require('./Markdown'));
} else {

@@ -10,6 +10,6 @@ var mod = {

};
factory(mod, global.Gist, global.User, global.Issue, global.Search, global.RateLimit, global.Repository, global.Organization, global.Markdown);
factory(mod, global.Gist, global.User, global.Issue, global.Search, global.RateLimit, global.Repository, global.Organization, global.Team, global.Markdown);
global.GitHub = mod.exports;
}
})(this, function (module, _Gist, _User, _Issue, _Search, _RateLimit, _Repository, _Organization, _Markdown) {
})(this, function (module, _Gist, _User, _Issue, _Search, _RateLimit, _Repository, _Organization, _Team, _Markdown) {
'use strict';

@@ -31,2 +31,4 @@

var _Team2 = _interopRequireDefault(_Team);
var _Markdown2 = _interopRequireDefault(_Markdown);

@@ -104,2 +106,7 @@

}, {
key: 'getTeam',
value: function getTeam(teamId) {
return new _Team2.default(teamId, this.__auth, this.__apiBase);
}
}, {
key: 'getRepo',

@@ -147,3 +154,3 @@ value: function getRepo(user, repo) {

});
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkdpdEh1Yi5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7O01Bb0JNLE07Ozs7Ozs7O0FBT0gsb0JBQVksSUFBWixFQUFzRDtBQUFBLFVBQXBDLE9BQW9DLHlEQUExQix3QkFBMEI7O0FBQUE7O0FBQ25ELFdBQUssU0FBTCxHQUFpQixPQUFqQjtBQUNBLFdBQUssTUFBTCxHQUFjLFFBQVEsRUFBdEI7QUFDRjs7Ozs7Ozs7Ozs7OEJBT08sRSxFQUFJO0FBQ1QsZUFBTyxtQkFBUyxFQUFULEVBQWEsS0FBSyxNQUFsQixFQUEwQixLQUFLLFNBQS9CLENBQVA7QUFDRjs7OzhCQVFPLEksRUFBTTtBQUNYLGVBQU8sbUJBQVMsSUFBVCxFQUFlLEtBQUssTUFBcEIsRUFBNEIsS0FBSyxTQUFqQyxDQUFQO0FBQ0Y7OztzQ0FRZSxZLEVBQWM7QUFDM0IsZUFBTywyQkFBaUIsWUFBakIsRUFBK0IsS0FBSyxNQUFwQyxFQUE0QyxLQUFLLFNBQWpELENBQVA7QUFDRjs7OzhCQVFPLEksRUFBTSxJLEVBQU07QUFDakIsZUFBTyx5QkFBZSxLQUFLLFlBQUwsQ0FBa0IsSUFBbEIsRUFBd0IsSUFBeEIsQ0FBZixFQUE4QyxLQUFLLE1BQW5ELEVBQTJELEtBQUssU0FBaEUsQ0FBUDtBQUNGOzs7Z0NBUVMsSSxFQUFNLEksRUFBTTtBQUNu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oaXMuX19hcGlCYXNlKTtcbiAgIH1cblxuICAgLyoqXG4gICAgKiBDb21wdXRlcyB0aGUgZnVsbCByZXBvc2l0b3J5IG5hbWVcbiAgICAqIEBwYXJhbSB7c3RyaW5nfSB1c2VyIC0gdGhlIHVzZXJuYW1lIChvciB0aGUgZnVsbCBuYW1lKVxuICAgICogQHBhcmFtIHtzdHJpbmd9IHJlcG8gLSB0aGUgcmVwb3NpdG9yeSBuYW1lLCBtdXN0IG5vdCBiZSBwYXNzZWQgaWYgYHVzZXJgIGlzIHRoZSBmdWxsIG5hbWVcbiAgICAqIEByZXR1cm4ge3N0cmluZ30gdGhlIHJlcG9zaXRvcnkncyBmdWxsIG5hbWVcbiAgICAqL1xuICAgX2dldEZ1bGxOYW1lKHVzZXIsIHJlcG8pIHtcbiAgICAgIGxldCBmdWxsbmFtZSA9IHVzZXI7XG5cbiAgICAgIGlmIChyZXBvKSB7XG4gICAgICAgICBmdWxsbmFtZSA9IGAke3VzZXJ9LyR7cmVwb31gO1xuICAgICAgfVxuXG4gICAgICByZXR1cm4gZnVsbG5hbWU7XG4gICB9XG59XG5cbm1vZHVsZS5leHBvcnRzID0gR2l0SHViO1xuIl19
//# sourceMappingURL=GitHub.js.map

@@ -122,2 +122,12 @@ (function (global, factory) {

}
}, {
key: 'getTeams',
value: function getTeams(cb) {
return this._requestAllPages('/orgs/' + this.__name + '/teams', undefined, cb);
}
}, {
key: 'createTeam',
value: function createTeam(options, cb) {
return this._request('POST', '/orgs/' + this.__name + '/teams', options, cb);
}
}]);

@@ -130,3 +140,3 @@

});
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIk9yZ2FuaXphdGlvbi5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7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bmd9IFtvcHRpb25zLnJlcG9fbmFtZXNdIC0gUmVwb3MgdG8gYWRkIHRoZSB0ZWFtIHRvXG4gICAgKiBAcGFyYW0ge3N0cmluZ30gW29wdGlvbnMucHJpdmFjeT1zZWNyZXRdIC0gVGhlIGxldmVsIG9mIHByaXZhY3kgdGhlIHRlYW0gc2hvdWxkIGhhdmUuIENhbiBiZSBlaXRoZXIgb25lXG4gICAgKiBvZjogYHNlY3JldGAsIG9yIGBjbG9zZWRgXG4gICAgKiBAcGFyYW0ge1JlcXVlc3RhYmxlLmNhbGxiYWNrfSBbY2JdIC0gd2lsbCByZWNlaXZlIHRoZSBjcmVhdGVkIHRlYW1cbiAgICAqIEByZXR1cm4ge1Byb21pc2V9IC0gdGhlIHByb21pc2UgZm9yIHRoZSBodHRwIHJlcXVlc3RcbiAgICAqL1xuICAgY3JlYXRlVGVhbShvcHRpb25zLCBjYikge1xuICAgICAgcmV0dXJuIHRoaXMuX3JlcXVlc3QoJ1BPU1QnLCBgL29yZ3MvJHt0aGlzLl9fbmFtZX0vdGVhbXNgLCBvcHRpb25zLCBjYik7XG4gICB9XG59XG5cbm1vZHVsZS5leHBvcnRzID0gT3JnYW5pemF0aW9uO1xuIl19
//# sourceMappingURL=Organization.js.map

@@ -214,3 +214,5 @@ (function (global, factory) {

value: function _request204or404(path, data, cb) {
return this._request('GET', path, data).then(function success(response) {
var method = arguments.length <= 3 || arguments[3] === undefined ? 'GET' : arguments[3];
return this._request(method, path, data).then(function success(response) {
if (cb) {

@@ -328,3 +330,3 @@ cb(null, true, response);

});
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIlJlcXVlc3RhYmxlLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7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UmVxdWVzdGFibGUuY2FsbGJhY2t9IGNiIC0gdGhlIGNhbGxiYWNrIHRoYXQgd2lsbCByZWNlaXZlIGB0cnVlYCBvciBgZmFsc2VgXG4gICAgKiBAcGFyYW0ge21ldGhvZH0gW21ldGhvZD1HRVRdIC0gSFRUUCBNZXRob2QgdG8gdXNlXG4gICAgKiBAcmV0dXJuIHtQcm9taXNlfSAtIHRoZSBwcm9taXNlIGZvciB0aGUgaHR0cCByZXF1ZXN0XG4gICAgKi9cbiAgIF9yZXF1ZXN0MjA0b3I0MDQocGF0aCwgZGF0YSwgY2IsIG1ldGhvZCA9ICdHRVQnKSB7XG4gICAgICByZXR1cm4gdGhpcy5fcmVxdWVzdChtZXRob2QsIHBhdGgsIGRhdGEpXG4gICAgICAgICAudGhlbihmdW5jdGlvbiBzdWNjZXNzKHJlc3BvbnNlKSB7XG4gICAgICAgICAgICBpZiAoY2IpIHtcbiAgICAgICAgICAgICAgIGNiKG51bGwsIHRydWUsIHJlc3BvbnNlKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJldHVybiB0cnVlO1xuICAgICAgICAgfSwgZnVuY3Rpb24gZmFpbHVyZShyZXNwb25zZSkge1xuICAgICAgICAgICAgaWYgKHJlc3BvbnNlLnN0YXR1cyA9PT0gNDA0KSB7XG4gICAgICAgICAgICAgICBpZiAoY2IpIHtcbiAgICAgICAgICAgICAgICAgIGNiKG51bGwsIGZhbHNlLCByZXNwb25zZSk7XG4gICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGlmIChjYikge1xuICAgICAgICAgICAgICAgY2IocmVzcG9uc2UpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgdGhyb3cgcmVzcG9uc2U7XG4gICAgICAgICB9KTtcbiAgIH1cblxuICAgLyoqXG4gICAgKiBNYWtlIGEgcmVxdWVzdCBhbmQgZmV0Y2ggYWxsIHRoZSB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QoJ0dFVCcsIHBhdGgsIG9wdGlvbnMpXG4gICAgICAgICAudGhlbigocmVzcG9uc2UpID0+IHtcbiAgICAgICAgICAgIHJlc3VsdHMucHVzaC5hcHBseShyZXN1bHRzLCByZXNwb25zZS5kYXRhKTtcblxuICAgICAgICAgICAgY29uc3QgbmV4dFVybCA9IGdldE5leHRQYWdlKHJlc3BvbnNlLmhlYWRlcnMubGluayk7XG4gICAgICAgICAgICBpZiAobmV4dFVybCkge1xuICAgICAgICAgICAgICAgbG9nKGBnZXR0aW5nIG5leHQgcGFnZTogJHtuZXh0VXJsfWApO1xuICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMuX3JlcXVlc3RBbGxQYWdlcyhuZXh0VXJsLCBvcHRpb25zLCBjYiwgcmVzdWx0cyk7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGlmIChjYikge1xuICAgICAgICAgICAgICAgY2IobnVsbCwgcmVzdWx0cywgcmVzcG9uc2UpO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICByZXNwb25zZS5kYXRhID0gcmVzdWx0cztcbiAgICAgICAgICAgIHJldHVybiByZXNwb25zZTtcbiAgICAgICAgIH0pLmNhdGNoKGNhbGxiYWNrRXJyb3JPclRocm93KGNiLCBwYXRoKSk7XG4gICB9XG59XG5cbm1vZHVsZS5leHBvcnRzID0gUmVxdWVzdGFibGU7XG5cbi8vIC8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vIC8vXG4vLyAgUHJpdmF0ZSBoZWxwZXIgZnVuY3Rpb25zICAvL1xuLy8gLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8gLy9cbi8qKlxuICogVGhlIGVycm9yIHN0cnVjdHVyZSByZXR1cm5lZCB3aGVuIGEgbmV0d29yayBjYWxsIGZhaWxzXG4gKi9cbmNsYXNzIFJlc3BvbnNlRXJyb3IgZXh0ZW5kcyBFcnJvciB7XG4gICAvKipcbiAgICAqIENvbnN0cnVjdCBhIG5ldyBSZ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iAgICAgIH1cblxuICAgICAgcmV0dXJuIG5leHRVcmw7XG4gICB9LCB1bmRlZmluZWQpO1xufVxuXG5mdW5jdGlvbiBjYWxsYmFja0Vycm9yT3JUaHJvdyhjYiwgcGF0aCkge1xuICAgcmV0dXJuIGZ1bmN0aW9uIGhhbmRsZXIocmVzcG9uc2UpIHtcbiAgICAgIGxvZyhgZXJyb3IgbWFraW5nIHJlcXVlc3QgJHtyZXNwb25zZS5jb25maWcubWV0aG9kfSAke3Jlc3BvbnNlLmNvbmZpZy51cmx9ICR7SlNPTi5zdHJpbmdpZnkocmVzcG9uc2UuZGF0YSl9YCk7XG4gICAgICBsZXQgZXJyb3IgPSBuZXcgUmVzcG9uc2VFcnJvcihwYXRoLCByZXNwb25zZSk7XG4gICAgICBpZiAoY2IpIHtcbiAgICAgICAgIGxvZygnZ29pbmcgdG8gZXJyb3IgY2FsbGJhY2snKTtcbiAgICAgICAgIGNiKGVycm9yKTtcbiAgICAgIH0gZWxzZSB7XG4gICAgICAgICBsb2coJ3Rocm93aW5nIGVycm9yJyk7XG4gICAgICAgICB0aHJvdyBlcnJvcjtcbiAgICAgIH1cbiAgIH07XG59XG4iXX0=
//# sourceMappingURL=Requestable.js.map

@@ -1,2 +0,3 @@

!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,t.GitHub=e()}}(function(){var e;return function t(e,n,r){function u(s,i){if(!n[s]){if(!e[s]){var a="function"==typeof require&&require;if(!i&&a)return a(s,!0);if(o)return o(s,!0);var l=new Error("Cannot find module '"+s+"'");throw l.code="MODULE_NOT_FOUND",l}var f=n[s]={exports:{}};e[s][0].call(f.exports,function(t){var n=e[s][1][t];return u(n?n:t)},f,f.exports,t,e,n,r)}return n[s].exports}for(var o="function"==typeof require&&require,s=0;s<r.length;s++)u(r[s]);return u}({1:[function(t,n,r){!function(u,o){if("function"==typeof e&&e.amd)e(["module","./Requestable"],o);else if("undefined"!=typeof r)o(n,t("./Requestable"));else{var s={exports:{}};o(s,u.Requestable),u.Gist=s.exports}}(this,function(e,t){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var s=n(t),i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=function(e){function t(e,n,o){r(this,t);var s=u(this,Object.getPrototypeOf(t).call(this,n,o));return s.__id=e,s}return o(t,e),i(t,[{key:"read",value:function(e){return this._request("GET","/gists/"+this.__id,null,e)}},{key:"create",value:function(e,t){var n=this;return this._request("POST","/gists",e,t).then(function(e){return n.__id=e.data.id,e})}},{key:"delete",value:function(e){return this._request("DELETE","/gists/"+this.__id,null,e)}},{key:"fork",value:function(e){return this._request("POST","/gists/"+this.__id+"/forks",null,e)}},{key:"update",value:function(e,t){return this._request("PATCH","/gists/"+this.__id,e,t)}},{key:"star",value:function(e){return this._request("PUT","/gists/"+this.__id+"/star",null,e)}},{key:"unstar",value:function(e){return this._request("DELETE","/gists/"+this.__id+"/star",null,e)}},{key:"isStarred",value:function(e){return this._request204or404("/gists/"+this.__id+"/star",null,e)}},{key:"listComments",value:function(e){return this._requestAllPages("/gists/"+this.__id+"/comments",null,e)}},{key:"getComment",value:function(e,t){return this._request("GET","/gists/"+this.__id+"/comments/"+e,null,t)}},{key:"createComment",value:function(e,t){return this._request("POST","/gists/"+this.__id+"/comments",{body:e},t)}},{key:"editComment",value:function(e,t,n){return this._request("PATCH","/gists/"+this.__id+"/comments/"+e,{body:t},n)}},{key:"deleteComment",value:function(e,t){return this._request("DELETE","/gists/"+this.__id+"/comments/"+e,null,t)}}]),t}(s["default"]);e.exports=a})},{"./Requestable":8}],2:[function(t,n,r){!function(u,o){if("function"==typeof e&&e.amd)e(["module","./Gist","./User","./Issue","./Search","./RateLimit","./Repository","./Organization","./Markdown"],o);else if("undefined"!=typeof r)o(n,t("./Gist"),t("./User"),t("./Issue"),t("./Search"),t("./RateLimit"),t("./Repository"),t("./Organization"),t("./Markdown"));else{var s={exports:{}};o(s,u.Gist,u.User,u.Issue,u.Search,u.RateLimit,u.Repository,u.Organization,u.Markdown),u.GitHub=s.exports}}(this,function(e,t,n,r,u,o,s,i,a){"use strict";function l(e){return e&&e.__esModule?e:{"default":e}}function f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var c=l(t),h=l(n),p=l(r),_=l(u),y=l(o),d=l(s),b=l(i),v=l(a),m=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),g=function(){function e(t){var n=arguments.length<=1||void 0===arguments[1]?"https://api.github.com":arguments[1];f(this,e),this.__apiBase=n,this.__auth=t||{}}return m(e,[{key:"getGist",value:function(e){return new c["default"](e,this.__auth,this.__apiBase)}},{key:"getUser",value:function(e){return new h["default"](e,this.__auth,this.__apiBase)}},{key:"getOrganization",value:function(e){return new b["default"](e,this.__auth,this.__apiBase)}},{key:"getRepo",value:function(e,t){return new d["default"](this._getFullName(e,t),this.__auth,this.__apiBase)}},{key:"getIssues",value:function(e,t){return new p["default"](this._getFullName(e,t),this.__auth,this.__apiBase)}},{key:"search",value:function(e){return new _["default"](e,this.__auth,this.__apiBase)}},{key:"getRateLimit",value:function(){return new y["default"](this.__auth,this.__apiBase)}},{key:"getMarkdown",value:function(){return new v["default"](this.__auth,this.__apiBase)}},{key:"_getFullName",value:function(e,t){var n=e;return t&&(n=e+"/"+t),n}}]),e}();e.exports=g})},{"./Gist":1,"./Issue":3,"./Markdown":4,"./Organization":5,"./RateLimit":6,"./Repository":7,"./Search":9,"./User":10}],3:[function(t,n,r){!function(u,o){if("function"==typeof e&&e.amd)e(["module","./Requestable"],o);else if("undefined"!=typeof r)o(n,t("./Requestable"));else{var s={exports:{}};o(s,u.Requestable),u.Issue=s.exports}}(this,function(e,t){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var s=n(t),i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=function(e){function t(e,n,o){r(this,t);var s=u(this,Object.getPrototypeOf(t).call(this,n,o));return s.__repository=e,s}return o(t,e),i(t,[{key:"createIssue",value:function(e,t){return this._request("POST","/repos/"+this.__repository+"/issues",e,t)}},{key:"listIssues",value:function(e,t){return this._requestAllPages("/repos/"+this.__repository+"/issues",e,t)}},{key:"listIssueComments",value:function(e,t){return this._request("GET","/repos/"+this.__repository+"/issues/"+e+"/comments",null,t)}},{key:"getIssueComment",value:function(e,t){return this._request("GET","/repos/"+this.__repository+"/issues/comments/"+e,null,t)}},{key:"createIssueComment",value:function(e,t,n){return this._request("POST","/repos/"+this.__repository+"/issues/"+e+"/comments",{body:t},n)}},{key:"editIssueComment",value:function(e,t,n){return this._request("PATCH","/repos/"+this.__repository+"/issues/comments/"+e,{body:t},n)}},{key:"deleteIssueComment",value:function(e,t){return this._request("DELETE","/repos/"+this.__repository+"/issues/comments/"+e,null,t)}},{key:"editIssue",value:function(e,t,n){return this._request("PATCH","/repos/"+this.__repository+"/issues/"+e,t,n)}},{key:"getIssue",value:function(e,t){return this._request("GET","/repos/"+this.__repository+"/issues/"+e,null,t)}},{key:"listMilestones",value:function(e,t){return this._request("GET","/repos/"+this.__repository+"/milestones",e,t)}},{key:"getMilestone",value:function(e,t){return this._request("GET","/repos/"+this.__repository+"/milestones/"+e,null,t)}},{key:"createMilestone",value:function(e,t){return this._request("POST","/repos/"+this.__repository+"/milestones",e,t)}},{key:"editMilestone",value:function(e,t,n){return this._request("PATCH","/repos/"+this.__repository+"/milestones/"+e,t,n)}},{key:"deleteMilestone",value:function(e,t){return this._request("DELETE","/repos/"+this.__repository+"/milestones/"+e,null,t)}}]),t}(s["default"]);e.exports=a})},{"./Requestable":8}],4:[function(t,n,r){!function(u,o){if("function"==typeof e&&e.amd)e(["module","./Requestable"],o);else if("undefined"!=typeof r)o(n,t("./Requestable"));else{var s={exports:{}};o(s,u.Requestable),u.Markdown=s.exports}}(this,function(e,t){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var s=n(t),i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=function(e){function t(e,n){return r(this,t),u(this,Object.getPrototypeOf(t).call(this,e,n))}return o(t,e),i(t,[{key:"render",value:function(e,t){return this._request("POST","/markdown",e,t)}}]),t}(s["default"]);e.exports=a})},{"./Requestable":8}],5:[function(t,n,r){!function(u,o){if("function"==typeof e&&e.amd)e(["module","./Requestable"],o);else if("undefined"!=typeof r)o(n,t("./Requestable"));else{var s={exports:{}};o(s,u.Requestable),u.Organization=s.exports}}(this,function(e,t){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var s=n(t),i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=function(e){function t(e,n,o){r(this,t);var s=u(this,Object.getPrototypeOf(t).call(this,n,o));return s.__name=e,s}return o(t,e),i(t,[{key:"createRepo",value:function(e,t){return this._request("POST","/orgs/"+this.__name+"/repos",e,t)}},{key:"getRepos",value:function(e){var t=this._getOptionsWithDefaults({direction:"desc"});return this._requestAllPages("/orgs/"+this.__name+"/repos",t,e)}},{key:"isMember",value:function(e,t){return this._request204or404("/orgs/"+this.__name+"/members/"+e,null,t)}},{key:"listMembers",value:function(e,t){return this._request("GET","/orgs/"+this.__name+"/members",e,t)}}]),t}(s["default"]);e.exports=a})},{"./Requestable":8}],6:[function(t,n,r){!function(u,o){if("function"==typeof e&&e.amd)e(["module","./Requestable"],o);else if("undefined"!=typeof r)o(n,t("./Requestable"));else{var s={exports:{}};o(s,u.Requestable),u.RateLimit=s.exports}}(this,function(e,t){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var s=n(t),i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=function(e){function t(e,n){return r(this,t),u(this,Object.getPrototypeOf(t).call(this,e,n))}return o(t,e),i(t,[{key:"getRateLimit",value:function(e){return this._request("GET","/rate_limit",null,e)}}]),t}(s["default"]);e.exports=a})},{"./Requestable":8}],7:[function(t,n,r){(function(u){!function(u,o){if("function"==typeof e&&e.amd)e(["module","./Requestable","utf8","js-base64","debug"],o);else if("undefined"!=typeof r)o(n,t("./Requestable"),t("utf8"),t("js-base64"),t("debug"));else{var s={exports:{}};o(s,u.Requestable,u.utf8,u.jsBase64,u.debug),u.Repository=s.exports}}(this,function(e,t,n,r,o){"use strict";function s(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function l(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var f=s(t),c=s(n),h=s(o),p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e},_=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),y=(0,h["default"])("github:repository"),d=function(e){function t(e,n,r){i(this,t);var u=a(this,Object.getPrototypeOf(t).call(this,n,r));return u.__fullname=e,u.__currentTree={branch:null,sha:null},u}return l(t,e),_(t,[{key:"getRef",value:function(e,t){return this._request("GET","/repos/"+this.__fullname+"/git/refs/"+e,null,t)}},{key:"createRef",value:function(e,t){return this._request("POST","/repos/"+this.__fullname+"/git/refs",e,t)}},{key:"deleteRef",value:function(e,t){return this._request("DELETE","/repos/"+this.__fullname+"/git/refs/"+e,null,t)}},{key:"deleteRepo",value:function(e){return this._request("DELETE","/repos/"+this.__fullname,null,e)}},{key:"listTags",value:function(e){return this._request("GET","/repos/"+this.__fullname+"/tags",null,e)}},{key:"listPullRequests",value:function(e,t){return e=e||{},this._request("GET","/repos/"+this.__fullname+"/pulls",e,t)}},{key:"getPullRequest",value:function(e,t){return this._request("GET","/repos/"+this.__fullname+"/pulls/"+e,null,t)}},{key:"compareBranches",value:function(e,t,n){return this._request("GET","/repos/"+this.__fullname+"/compare/"+e+"..."+t,null,n)}},{key:"listBranches",value:function(e){return this._request("GET","/repos/"+this.__fullname+"/branches",null,e)}},{key:"getBlob",value:function(e,t){return this._request("GET","/repos/"+this.__fullname+"/git/blobs/"+e,null,t,"raw")}},{key:"getCommit",value:function(e,t){return this._request("GET","/repos/"+this.__fullname+"/git/commits/"+e,null,t)}},{key:"listCommits",value:function(e,t){return e=e||{},e.since=this._dateToISO(e.since),e.until=this._dateToISO(e.until),this._request("GET","/repos/"+this.__fullname+"/commits",e,t)}},{key:"getSha",value:function(e,t,n){return e=e?"?ref="+e:"",this._request("GET","/repos/"+this.__fullname+"/contents/"+t+e,null,n)}},{key:"listStatuses",value:function(e,t){return this._request("GET","/repos/"+this.__fullname+"/commits/"+e+"/statuses",null,t)}},{key:"getTree",value:function(e,t){return this._request("GET","/repos/"+this.__fullname+"/git/trees/"+e,null,t)}},{key:"createBlob",value:function(e,t){var n=this._getContentObject(e);return y("sending content",n),this._request("POST","/repos/"+this.__fullname+"/git/blobs",n,t)}},{key:"_getContentObject",value:function(e){if("string"==typeof e)return y("contet is a string"),{content:c["default"].encode(e),encoding:"utf-8"};if("undefined"!=typeof u&&e instanceof u)return y("We appear to be in Node"),{content:e.toString("base64"),encoding:"base64"};if("undefined"!=typeof Blob&&e instanceof Blob)return y("We appear to be in the browser"),{content:r.Base64.encode(e),encoding:"base64"};throw y("Not sure what this content is: "+("undefined"==typeof e?"undefined":p(e))+", "+JSON.stringify(e)),new Error("Unknown content passed to postBlob. Must be string or Buffer (node) or Blob (web)")}},{key:"updateTree",value:function(e,t,n,r){var u={base_tree:e,tree:[{path:t,sha:n,mode:"100644",type:"blob"}]};return this._request("POST","/repos/"+this.__fullname+"/git/trees",u,r)}},{key:"createTree",value:function(e,t,n){return this._request("POST","/repos/"+this.__fullname+"/git/trees",{tree:e,base_tree:t},n)}},{key:"commit",value:function(e,t,n,r){var u=this,o={message:n,tree:t,parents:[e]};return this._request("POST","/repos/"+this.__fullname+"/git/commits",o,r).then(function(e){return u.__currentTree.sha=e.data.sha,e})}},{key:"updateHead",value:function(e,t,n,r){return this._request("PATCH","/repos/"+this.__fullname+"/git/refs/"+e,{sha:t,force:n},r)}},{key:"getDetails",value:function(e){return this._request("GET","/repos/"+this.__fullname,null,e)}},{key:"getContributors",value:function(e){return this._request("GET","/repos/"+this.__fullname+"/stats/contributors",null,e)}},{key:"getCollaborators",value:function(e){return this._request("GET","/repos/"+this.__fullname+"/collaborators",null,e)}},{key:"isCollaborator",value:function(e,t){return this._request("GET","/repos/"+this.__fullname+"/collaborators/"+e,null,t)}},{key:"getContents",value:function(e,t,n,r){return t=t?""+encodeURI(t):"",this._request("GET","/repos/"+this.__fullname+"/contents/"+t,{ref:e},r,n)}},{key:"fork",value:function(e){return this._request("POST","/repos/"+this.__fullname+"/forks",null,e)}},{key:"listForks",value:function(e){return this._request("GET","/repos/"+this.__fullname+"/forks",null,e)}},{key:"createBranch",value:function(e,t,n){var r=this;return"function"==typeof t&&(n=t,t=e,e="master"),this.getRef("heads/"+e).then(function(e){var u=e.data.object.sha;return r.createRef({sha:u,ref:"refs/heads/"+t},n)})}},{key:"createPullRequest",value:function(e,t){return this._request("POST","/repos/"+this.__fullname+"/pulls",e,t)}},{key:"listHooks",value:function(e){return this._request("GET","/repos/"+this.__fullname+"/hooks",null,e)}},{key:"getHook",value:function(e,t){return this._request("GET","/repos/"+this.__fullname+"/hooks/"+e,null,t)}},{key:"createHook",value:function(e,t){return this._request("POST","/repos/"+this.__fullname+"/hooks",e,t)}},{key:"updateHook",value:function(e,t,n){return this._request("PATCH","/repos/"+this.__fullname+"/hooks/"+e,t,n)}},{key:"deleteHook",value:function(e,t){return this._request("DELETE",this.__repoPath+"/hooks/"+e,null,t)}},{key:"deleteFile",value:function(e,t,n){var r=this;return this.getSha(e,t).then(function(u){var o={message:"Delete the file at '"+t+"'",sha:u.data.sha,branch:e};return r._request("DELETE","/repos/"+r.__fullname+"/contents/"+t,o,n)})}},{key:"move",value:function(e,t,n,r){var u=this,o=void 0;return this.getRef("heads/"+e).then(function(e){var t=e.data.object;return u.getTree(t.sha+"?recursive=true")}).then(function(e){var r=e.data,s=r.tree,i=r.sha;o=i;var a=s.map(function(e){return e.path===t&&(e.path=n),"tree"===e.type&&delete e.sha,e});return u.createTree(a)}).then(function(e){var r=e.data;return u.commit(o,r.sha,"Renamed '"+t+"' to '"+n+"'")}).then(function(t){var n=t.data;return u.updateHead("heads/"+e,n.sha,!0,r)})}},{key:"writeFile",value:function(e,t,n,u,o,s){var i=this;"function"==typeof o&&(s=o,o={});var a=t?encodeURI(t):"",l=o.encode!==!1,f={branch:e,message:u,author:o.author,committer:o.committer,content:l?r.Base64.encode(n):n};return this.getSha(e,a).then(function(e){return f.sha=e.data.sha,i._request("PUT","/repos/"+i.__fullname+"/contents/"+a,f,s)},function(){return i._request("PUT","/repos/"+i.__fullname+"/contents/"+a,f,s)})}},{key:"isStarred",value:function(e){return this._request204or404("/user/starred/"+this.__fullname,null,e)}},{key:"star",value:function(e){return this._request("PUT","/user/starred/"+this.__fullname,null,e)}},{key:"unstar",value:function(e){return this._request("DELETE","/user/starred/"+this.__fullname,null,e)}},{key:"createRelease",value:function(e,t){return this._request("POST","/repos/"+this.__fullname+"/releases",e,t)}},{key:"updateRelease",value:function(e,t,n){return this._request("PATCH","/repos/"+this.__fullname+"/releases/"+e,t,n)}},{key:"listReleases",value:function(e){return this._request("GET","/repos/"+this.__fullname+"/releases",null,e)}},{key:"getRelease",value:function(e,t){return this._request("GET","/repos/"+this.__fullname+"/releases/"+e,null,t)}},{key:"deleteRelease",value:function(e,t){return this._request("DELETE","/repos/"+this.__fullname+"/releases/"+e,null,t)}}]),t}(f["default"]);e.exports=d})}).call(this,t("buffer").Buffer)},{"./Requestable":8,buffer:void 0,debug:void 0,"js-base64":void 0,utf8:void 0}],8:[function(t,n,r){!function(u,o){if("function"==typeof e&&e.amd)e(["module","axios","debug","js-base64","es6-promise"],o);else if("undefined"!=typeof r)o(n,t("axios"),t("debug"),t("js-base64"),t("es6-promise"));else{var s={exports:{}};o(s,u.axios,u.debug,u.jsBase64,u.Promise),u.Requestable=s.exports}}(this,function(e,t,n,r,u){"use strict";function o(e){return e&&e.__esModule?e:{"default":e}}function s(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e){return-1!==m.indexOf(e)}function f(){var e=arguments.length<=0||void 0===arguments[0]?"":arguments[0],t=e.split(/\s*,\s*/);return t.reduce(function(e,t){return-1!==t.search(/rel="next"/)?(t.match(/<(.*)>/)||[])[1]:e},void 0)}function c(e,t){return function(n){d("error making request "+n.config.method+" "+n.config.url+" "+JSON.stringify(n.data));var r=new v(t,n);if(!e)throw d("throwing error"),r;d("going to error callback"),e(r)}}var h=o(t),p=o(n),_="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e},y=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),d=(0,p["default"])("github:request");"undefined"==typeof Promise&&(0,u.polyfill)();var b=function(){function e(t,n){a(this,e),this.__apiBase=n||"https://api.github.com",this.__auth={token:t.token,username:t.username,password:t.password},t.token?this.__authorizationHeader="token "+t.token:t.username&&t.password&&(this.__authorizationHeader="Basic "+r.Base64.encode(t.username+":"+t.password))}return y(e,[{key:"__getURL",value:function(e){var t=e;-1===e.indexOf("//")&&(t=this.__apiBase+e);var n="timestamp="+(new Date).getTime();return t.replace(/(timestamp=\d+)/,n)}},{key:"__getRequestHeaders",value:function(e){var t={Accept:e?"application/vnd.github.v3.raw+json":"application/vnd.github.v3+json","Content-Type":"application/json;charset=UTF-8"};return this.__authorizationHeader&&(t.Authorization=this.__authorizationHeader),t}},{key:"_getOptionsWithDefaults",value:function(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];return e.visibility||e.affiliation||(e.type=e.type||"all"),e.sort=e.sort||"updated",e.per_page=e.per_page||"100",e}},{key:"_dateToISO",value:function(e){return e&&e instanceof Date&&(e=e.toISOString()),e}},{key:"_request",value:function(e,t,n,r,u){var o=this.__getURL(t),s=this.__getRequestHeaders(u),i={},a=n&&"object"===("undefined"==typeof n?"undefined":_(n))&&l(e);a&&(i=n,n=void 0);var f={url:o,method:e,headers:s,params:i,data:n,responseType:u?"text":"json"};d(f.method+" to "+f.url);var p=(0,h["default"])(f)["catch"](c(r,t));return r&&p.then(function(e){r(null,e.data||!0,e)}),p}},{key:"_request204or404",value:function(e,t,n){return this._request("GET",e,t).then(function(e){return n&&n(null,!0,e),!0},function(e){if(404===e.status)return n&&n(null,!1,e),!1;throw n&&n(e),e})}},{key:"_requestAllPages",value:function(e,t,n,r){var u=this;return r=r||[],this._request("GET",e,t).then(function(e){r.push.apply(r,e.data);var o=f(e.headers.link);return o?(d("getting next page: "+o),u._requestAllPages(o,t,n,r)):(n&&n(null,r,e),e.data=r,e)})["catch"](c(n,e))}}]),e}();e.exports=b;var v=function(e){function t(e,n){a(this,t);var r=s(this,Object.getPrototypeOf(t).call(this,"error making request "+n.config.method+" "+n.config.url));return r.path=e,r.request=n.config,r.response=n,r.status=n.status,r}return i(t,e),t}(Error),m=["GET","HEAD","DELETE"]})},{axios:void 0,debug:void 0,"es6-promise":void 0,"js-base64":void 0}],9:[function(t,n,r){!function(u,o){if("function"==typeof e&&e.amd)e(["module","./Requestable","debug"],o);else if("undefined"!=typeof r)o(n,t("./Requestable"),t("debug"));else{var s={exports:{}};o(s,u.Requestable,u.debug),u.Search=s.exports}}(this,function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var i=r(t),a=r(n),l=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),f=(0,a["default"])("github:search"),c=function(e){function t(e,n,r){u(this,t);var s=o(this,Object.getPrototypeOf(t).call(this,n,r));return s.__defaults=s._getOptionsWithDefaults(e),s}return s(t,e),l(t,[{key:"_search",value:function(e){var t=this,n=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],r=arguments.length<=2||void 0===arguments[2]?void 0:arguments[2],u={};return Object.keys(this.__defaults).forEach(function(e){u[e]=t.__defaults[e]}),Object.keys(n).forEach(function(e){u[e]=n[e]}),f("searching "+e+" with options:",u),this._requestAllPages("/search/"+e,u,r)}},{key:"forRepositories",value:function(e,t){return this._search("repositories",e,t)}},{key:"forCode",value:function(e,t){return this._search("code",e,t)}},{key:"forIssues",value:function(e,t){return this._search("issues",e,t)}},{key:"forUsers",value:function(e,t){return this._search("users",e,t)}}]),t}(i["default"]);e.exports=c})},{"./Requestable":8,debug:void 0}],10:[function(t,n,r){!function(u,o){if("function"==typeof e&&e.amd)e(["module","./Requestable","debug"],o);else if("undefined"!=typeof r)o(n,t("./Requestable"),t("debug"));else{var s={exports:{}};o(s,u.Requestable,u.debug),u.User=s.exports}}(this,function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var i=r(t),a=r(n),l=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),f=(0,a["default"])("github:user"),c=function(e){function t(e,n,r){u(this,t);var s=o(this,Object.getPrototypeOf(t).call(this,n,r));return s.__user=e,s}return s(t,e),l(t,[{key:"__getScopedUrl",value:function(e){if(this.__user)return e?"/users/"+this.__user+"/"+e:"/users/"+this.__user;switch(e){case"":return"/user";case"notifications":case"gists":return"/"+e;default:return"/user/"+e}}},{key:"listRepos",value:function(e,t){return"function"==typeof e&&(t=e,e={}),e=this._getOptionsWithDefaults(e),f("Fetching repositories with options: "+JSON.stringify(e)),this._requestAllPages(this.__getScopedUrl("repos"),e,t)}},{key:"listOrgs",value:function(e){return this._request("GET",this.__getScopedUrl("orgs"),null,e)}},{key:"listGists",value:function(e){return this._request("GET",this.__getScopedUrl("gists"),null,e)}},{key:"listNotifications",value:function(e,t){return e=e||{},"function"==typeof e&&(t=e,e={}),e.since=this._dateToISO(e.since),e.before=this._dateToISO(e.before),this._request("GET",this.__getScopedUrl("notifications"),e,t)}},{key:"getProfile",value:function(e){return this._request("GET",this.__getScopedUrl(""),null,e)}},{key:"listStarredRepos",value:function(e){var t=this._getOptionsWithDefaults();return this._requestAllPages(this.__getScopedUrl("starred"),t,e)}},{key:"follow",value:function(e,t){return this._request("PUT","/user/following/"+this.__user,null,t)}},{key:"unfollow",value:function(e,t){return this._request("DELETE","/user/following/"+this.__user,null,t)}},{key:"createRepo",value:function(e,t){return this._request("POST","/user/repos",e,t)}}]),t}(i["default"]);e.exports=c})},{"./Requestable":8,debug:void 0}]},{},[2])(2)});
!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,t.GitHub=e()}}(function(){var e;return function t(e,n,r){function u(s,i){if(!n[s]){if(!e[s]){var a="function"==typeof require&&require;if(!i&&a)return a(s,!0);if(o)return o(s,!0);var l=new Error("Cannot find module '"+s+"'");throw l.code="MODULE_NOT_FOUND",l}var f=n[s]={exports:{}};e[s][0].call(f.exports,function(t){var n=e[s][1][t];return u(n?n:t)},f,f.exports,t,e,n,r)}return n[s].exports}for(var o="function"==typeof require&&require,s=0;s<r.length;s++)u(r[s]);return u}({1:[function(t,n,r){!function(u,o){if("function"==typeof e&&e.amd)e(["module","./Requestable"],o);else if("undefined"!=typeof r)o(n,t("./Requestable"));else{var s={exports:{}};o(s,u.Requestable),u.Gist=s.exports}}(this,function(e,t){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var s=n(t),i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=function(e){function t(e,n,o){r(this,t);var s=u(this,Object.getPrototypeOf(t).call(this,n,o));return s.__id=e,s}return o(t,e),i(t,[{key:"read",value:function(e){return this._request("GET","/gists/"+this.__id,null,e)}},{key:"create",value:function(e,t){var n=this;return this._request("POST","/gists",e,t).then(function(e){return n.__id=e.data.id,e})}},{key:"delete",value:function(e){return this._request("DELETE","/gists/"+this.__id,null,e)}},{key:"fork",value:function(e){return this._request("POST","/gists/"+this.__id+"/forks",null,e)}},{key:"update",value:function(e,t){return this._request("PATCH","/gists/"+this.__id,e,t)}},{key:"star",value:function(e){return this._request("PUT","/gists/"+this.__id+"/star",null,e)}},{key:"unstar",value:function(e){return this._request("DELETE","/gists/"+this.__id+"/star",null,e)}},{key:"isStarred",value:function(e){return this._request204or404("/gists/"+this.__id+"/star",null,e)}},{key:"listComments",value:function(e){return this._requestAllPages("/gists/"+this.__id+"/comments",null,e)}},{key:"getComment",value:function(e,t){return this._request("GET","/gists/"+this.__id+"/comments/"+e,null,t)}},{key:"createComment",value:function(e,t){return this._request("POST","/gists/"+this.__id+"/comments",{body:e},t)}},{key:"editComment",value:function(e,t,n){return this._request("PATCH","/gists/"+this.__id+"/comments/"+e,{body:t},n)}},{key:"deleteComment",value:function(e,t){return this._request("DELETE","/gists/"+this.__id+"/comments/"+e,null,t)}}]),t}(s["default"]);e.exports=a})},{"./Requestable":8}],2:[function(t,n,r){!function(u,o){if("function"==typeof e&&e.amd)e(["module","./Gist","./User","./Issue","./Search","./RateLimit","./Repository","./Organization","./Team","./Markdown"],o);else if("undefined"!=typeof r)o(n,t("./Gist"),t("./User"),t("./Issue"),t("./Search"),t("./RateLimit"),t("./Repository"),t("./Organization"),t("./Team"),t("./Markdown"));else{var s={exports:{}};o(s,u.Gist,u.User,u.Issue,u.Search,u.RateLimit,u.Repository,u.Organization,u.Team,u.Markdown),u.GitHub=s.exports}}(this,function(e,t,n,r,u,o,s,i,a,l){"use strict";function f(e){return e&&e.__esModule?e:{"default":e}}function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var h=f(t),_=f(n),p=f(r),y=f(u),d=f(o),m=f(s),b=f(i),v=f(a),g=f(l),k=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),q=function(){function e(t){var n=arguments.length<=1||void 0===arguments[1]?"https://api.github.com":arguments[1];c(this,e),this.__apiBase=n,this.__auth=t||{}}return k(e,[{key:"getGist",value:function(e){return new h["default"](e,this.__auth,this.__apiBase)}},{key:"getUser",value:function(e){return new _["default"](e,this.__auth,this.__apiBase)}},{key:"getOrganization",value:function(e){return new b["default"](e,this.__auth,this.__apiBase)}},{key:"getTeam",value:function(e){return new v["default"](e,this.__auth,this.__apiBase)}},{key:"getRepo",value:function(e,t){return new m["default"](this._getFullName(e,t),this.__auth,this.__apiBase)}},{key:"getIssues",value:function(e,t){return new p["default"](this._getFullName(e,t),this.__auth,this.__apiBase)}},{key:"search",value:function(e){return new y["default"](e,this.__auth,this.__apiBase)}},{key:"getRateLimit",value:function(){return new d["default"](this.__auth,this.__apiBase)}},{key:"getMarkdown",value:function(){return new g["default"](this.__auth,this.__apiBase)}},{key:"_getFullName",value:function(e,t){var n=e;return t&&(n=e+"/"+t),n}}]),e}();e.exports=q})},{"./Gist":1,"./Issue":3,"./Markdown":4,"./Organization":5,"./RateLimit":6,"./Repository":7,"./Search":9,"./Team":10,"./User":11}],3:[function(t,n,r){!function(u,o){if("function"==typeof e&&e.amd)e(["module","./Requestable"],o);else if("undefined"!=typeof r)o(n,t("./Requestable"));else{var s={exports:{}};o(s,u.Requestable),u.Issue=s.exports}}(this,function(e,t){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var s=n(t),i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=function(e){function t(e,n,o){r(this,t);var s=u(this,Object.getPrototypeOf(t).call(this,n,o));return s.__repository=e,s}return o(t,e),i(t,[{key:"createIssue",value:function(e,t){return this._request("POST","/repos/"+this.__repository+"/issues",e,t)}},{key:"listIssues",value:function(e,t){return this._requestAllPages("/repos/"+this.__repository+"/issues",e,t)}},{key:"listIssueComments",value:function(e,t){return this._request("GET","/repos/"+this.__repository+"/issues/"+e+"/comments",null,t)}},{key:"getIssueComment",value:function(e,t){return this._request("GET","/repos/"+this.__repository+"/issues/comments/"+e,null,t)}},{key:"createIssueComment",value:function(e,t,n){return this._request("POST","/repos/"+this.__repository+"/issues/"+e+"/comments",{body:t},n)}},{key:"editIssueComment",value:function(e,t,n){return this._request("PATCH","/repos/"+this.__repository+"/issues/comments/"+e,{body:t},n)}},{key:"deleteIssueComment",value:function(e,t){return this._request("DELETE","/repos/"+this.__repository+"/issues/comments/"+e,null,t)}},{key:"editIssue",value:function(e,t,n){return this._request("PATCH","/repos/"+this.__repository+"/issues/"+e,t,n)}},{key:"getIssue",value:function(e,t){return this._request("GET","/repos/"+this.__repository+"/issues/"+e,null,t)}},{key:"listMilestones",value:function(e,t){return this._request("GET","/repos/"+this.__repository+"/milestones",e,t)}},{key:"getMilestone",value:function(e,t){return this._request("GET","/repos/"+this.__repository+"/milestones/"+e,null,t)}},{key:"createMilestone",value:function(e,t){return this._request("POST","/repos/"+this.__repository+"/milestones",e,t)}},{key:"editMilestone",value:function(e,t,n){return this._request("PATCH","/repos/"+this.__repository+"/milestones/"+e,t,n)}},{key:"deleteMilestone",value:function(e,t){return this._request("DELETE","/repos/"+this.__repository+"/milestones/"+e,null,t)}}]),t}(s["default"]);e.exports=a})},{"./Requestable":8}],4:[function(t,n,r){!function(u,o){if("function"==typeof e&&e.amd)e(["module","./Requestable"],o);else if("undefined"!=typeof r)o(n,t("./Requestable"));else{var s={exports:{}};o(s,u.Requestable),u.Markdown=s.exports}}(this,function(e,t){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var s=n(t),i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=function(e){function t(e,n){return r(this,t),u(this,Object.getPrototypeOf(t).call(this,e,n))}return o(t,e),i(t,[{key:"render",value:function(e,t){return this._request("POST","/markdown",e,t)}}]),t}(s["default"]);e.exports=a})},{"./Requestable":8}],5:[function(t,n,r){!function(u,o){if("function"==typeof e&&e.amd)e(["module","./Requestable"],o);else if("undefined"!=typeof r)o(n,t("./Requestable"));else{var s={exports:{}};o(s,u.Requestable),u.Organization=s.exports}}(this,function(e,t){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var s=n(t),i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=function(e){function t(e,n,o){r(this,t);var s=u(this,Object.getPrototypeOf(t).call(this,n,o));return s.__name=e,s}return o(t,e),i(t,[{key:"createRepo",value:function(e,t){return this._request("POST","/orgs/"+this.__name+"/repos",e,t)}},{key:"getRepos",value:function(e){var t=this._getOptionsWithDefaults({direction:"desc"});return this._requestAllPages("/orgs/"+this.__name+"/repos",t,e)}},{key:"isMember",value:function(e,t){return this._request204or404("/orgs/"+this.__name+"/members/"+e,null,t)}},{key:"listMembers",value:function(e,t){return this._request("GET","/orgs/"+this.__name+"/members",e,t)}},{key:"getTeams",value:function(e){return this._requestAllPages("/orgs/"+this.__name+"/teams",void 0,e)}},{key:"createTeam",value:function(e,t){return this._request("POST","/orgs/"+this.__name+"/teams",e,t)}}]),t}(s["default"]);e.exports=a})},{"./Requestable":8}],6:[function(t,n,r){!function(u,o){if("function"==typeof e&&e.amd)e(["module","./Requestable"],o);else if("undefined"!=typeof r)o(n,t("./Requestable"));else{var s={exports:{}};o(s,u.Requestable),u.RateLimit=s.exports}}(this,function(e,t){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var s=n(t),i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=function(e){function t(e,n){return r(this,t),u(this,Object.getPrototypeOf(t).call(this,e,n))}return o(t,e),i(t,[{key:"getRateLimit",value:function(e){return this._request("GET","/rate_limit",null,e)}}]),t}(s["default"]);e.exports=a})},{"./Requestable":8}],7:[function(t,n,r){(function(u){!function(u,o){if("function"==typeof e&&e.amd)e(["module","./Requestable","utf8","js-base64","debug"],o);else if("undefined"!=typeof r)o(n,t("./Requestable"),t("utf8"),t("js-base64"),t("debug"));else{var s={exports:{}};o(s,u.Requestable,u.utf8,u.jsBase64,u.debug),u.Repository=s.exports}}(this,function(e,t,n,r,o){"use strict";function s(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function l(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var f=s(t),c=s(n),h=s(o),_="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e},p=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),y=(0,h["default"])("github:repository"),d=function(e){function t(e,n,r){i(this,t);var u=a(this,Object.getPrototypeOf(t).call(this,n,r));return u.__fullname=e,u.__currentTree={branch:null,sha:null},u}return l(t,e),p(t,[{key:"getRef",value:function(e,t){return this._request("GET","/repos/"+this.__fullname+"/git/refs/"+e,null,t)}},{key:"createRef",value:function(e,t){return this._request("POST","/repos/"+this.__fullname+"/git/refs",e,t)}},{key:"deleteRef",value:function(e,t){return this._request("DELETE","/repos/"+this.__fullname+"/git/refs/"+e,null,t)}},{key:"deleteRepo",value:function(e){return this._request("DELETE","/repos/"+this.__fullname,null,e)}},{key:"listTags",value:function(e){return this._request("GET","/repos/"+this.__fullname+"/tags",null,e)}},{key:"listPullRequests",value:function(e,t){return e=e||{},this._request("GET","/repos/"+this.__fullname+"/pulls",e,t)}},{key:"getPullRequest",value:function(e,t){return this._request("GET","/repos/"+this.__fullname+"/pulls/"+e,null,t)}},{key:"compareBranches",value:function(e,t,n){return this._request("GET","/repos/"+this.__fullname+"/compare/"+e+"..."+t,null,n)}},{key:"listBranches",value:function(e){return this._request("GET","/repos/"+this.__fullname+"/branches",null,e)}},{key:"getBlob",value:function(e,t){return this._request("GET","/repos/"+this.__fullname+"/git/blobs/"+e,null,t,"raw")}},{key:"getCommit",value:function(e,t){return this._request("GET","/repos/"+this.__fullname+"/git/commits/"+e,null,t)}},{key:"listCommits",value:function(e,t){return e=e||{},e.since=this._dateToISO(e.since),e.until=this._dateToISO(e.until),this._request("GET","/repos/"+this.__fullname+"/commits",e,t)}},{key:"getSingleCommit",value:function(e,t){return e=e||"",this._request("GET","/repos/"+this.__fullname+"/commits/"+e,null,t)}},{key:"getSha",value:function(e,t,n){return e=e?"?ref="+e:"",this._request("GET","/repos/"+this.__fullname+"/contents/"+t+e,null,n)}},{key:"listStatuses",value:function(e,t){return this._request("GET","/repos/"+this.__fullname+"/commits/"+e+"/statuses",null,t)}},{key:"getTree",value:function(e,t){return this._request("GET","/repos/"+this.__fullname+"/git/trees/"+e,null,t)}},{key:"createBlob",value:function(e,t){var n=this._getContentObject(e);return y("sending content",n),this._request("POST","/repos/"+this.__fullname+"/git/blobs",n,t)}},{key:"_getContentObject",value:function(e){if("string"==typeof e)return y("contet is a string"),{content:c["default"].encode(e),encoding:"utf-8"};if("undefined"!=typeof u&&e instanceof u)return y("We appear to be in Node"),{content:e.toString("base64"),encoding:"base64"};if("undefined"!=typeof Blob&&e instanceof Blob)return y("We appear to be in the browser"),{content:r.Base64.encode(e),encoding:"base64"};throw y("Not sure what this content is: "+("undefined"==typeof e?"undefined":_(e))+", "+JSON.stringify(e)),new Error("Unknown content passed to postBlob. Must be string or Buffer (node) or Blob (web)")}},{key:"updateTree",value:function(e,t,n,r){var u={base_tree:e,tree:[{path:t,sha:n,mode:"100644",type:"blob"}]};return this._request("POST","/repos/"+this.__fullname+"/git/trees",u,r)}},{key:"createTree",value:function(e,t,n){return this._request("POST","/repos/"+this.__fullname+"/git/trees",{tree:e,base_tree:t},n)}},{key:"commit",value:function(e,t,n,r){var u=this,o={message:n,tree:t,parents:[e]};return this._request("POST","/repos/"+this.__fullname+"/git/commits",o,r).then(function(e){return u.__currentTree.sha=e.data.sha,e})}},{key:"updateHead",value:function(e,t,n,r){return this._request("PATCH","/repos/"+this.__fullname+"/git/refs/"+e,{sha:t,force:n},r)}},{key:"getDetails",value:function(e){return this._request("GET","/repos/"+this.__fullname,null,e)}},{key:"getContributors",value:function(e){return this._request("GET","/repos/"+this.__fullname+"/stats/contributors",null,e)}},{key:"getCollaborators",value:function(e){return this._request("GET","/repos/"+this.__fullname+"/collaborators",null,e)}},{key:"isCollaborator",value:function(e,t){return this._request("GET","/repos/"+this.__fullname+"/collaborators/"+e,null,t)}},{key:"getContents",value:function(e,t,n,r){return t=t?""+encodeURI(t):"",this._request("GET","/repos/"+this.__fullname+"/contents/"+t,{ref:e},r,n)}},{key:"fork",value:function(e){return this._request("POST","/repos/"+this.__fullname+"/forks",null,e)}},{key:"listForks",value:function(e){return this._request("GET","/repos/"+this.__fullname+"/forks",null,e)}},{key:"createBranch",value:function(e,t,n){var r=this;return"function"==typeof t&&(n=t,t=e,e="master"),this.getRef("heads/"+e).then(function(e){var u=e.data.object.sha;return r.createRef({sha:u,ref:"refs/heads/"+t},n)})}},{key:"createPullRequest",value:function(e,t){return this._request("POST","/repos/"+this.__fullname+"/pulls",e,t)}},{key:"listHooks",value:function(e){return this._request("GET","/repos/"+this.__fullname+"/hooks",null,e)}},{key:"getHook",value:function(e,t){return this._request("GET","/repos/"+this.__fullname+"/hooks/"+e,null,t)}},{key:"createHook",value:function(e,t){return this._request("POST","/repos/"+this.__fullname+"/hooks",e,t)}},{key:"updateHook",value:function(e,t,n){return this._request("PATCH","/repos/"+this.__fullname+"/hooks/"+e,t,n)}},{key:"deleteHook",value:function(e,t){return this._request("DELETE",this.__repoPath+"/hooks/"+e,null,t)}},{key:"deleteFile",value:function(e,t,n){var r=this;return this.getSha(e,t).then(function(u){var o={message:"Delete the file at '"+t+"'",sha:u.data.sha,branch:e};return r._request("DELETE","/repos/"+r.__fullname+"/contents/"+t,o,n)})}},{key:"move",value:function(e,t,n,r){var u=this,o=void 0;return this.getRef("heads/"+e).then(function(e){var t=e.data.object;return u.getTree(t.sha+"?recursive=true")}).then(function(e){var r=e.data,s=r.tree,i=r.sha;o=i;var a=s.map(function(e){return e.path===t&&(e.path=n),"tree"===e.type&&delete e.sha,e});return u.createTree(a)}).then(function(e){var r=e.data;return u.commit(o,r.sha,"Renamed '"+t+"' to '"+n+"'")}).then(function(t){var n=t.data;return u.updateHead("heads/"+e,n.sha,!0,r)})}},{key:"writeFile",value:function(e,t,n,u,o,s){var i=this;"function"==typeof o&&(s=o,o={});var a=t?encodeURI(t):"",l=o.encode!==!1,f={branch:e,message:u,author:o.author,committer:o.committer,content:l?r.Base64.encode(n):n};return this.getSha(e,a).then(function(e){return f.sha=e.data.sha,i._request("PUT","/repos/"+i.__fullname+"/contents/"+a,f,s)},function(){return i._request("PUT","/repos/"+i.__fullname+"/contents/"+a,f,s)})}},{key:"isStarred",value:function(e){return this._request204or404("/user/starred/"+this.__fullname,null,e)}},{key:"star",value:function(e){return this._request("PUT","/user/starred/"+this.__fullname,null,e)}},{key:"unstar",value:function(e){return this._request("DELETE","/user/starred/"+this.__fullname,null,e)}},{key:"createRelease",value:function(e,t){return this._request("POST","/repos/"+this.__fullname+"/releases",e,t)}},{key:"updateRelease",value:function(e,t,n){return this._request("PATCH","/repos/"+this.__fullname+"/releases/"+e,t,n)}},{key:"listReleases",value:function(e){return this._request("GET","/repos/"+this.__fullname+"/releases",null,e)}},{key:"getRelease",value:function(e,t){return this._request("GET","/repos/"+this.__fullname+"/releases/"+e,null,t)}},{key:"deleteRelease",value:function(e,t){return this._request("DELETE","/repos/"+this.__fullname+"/releases/"+e,null,t)}}]),t}(f["default"]);e.exports=d})}).call(this,t("buffer").Buffer)},{"./Requestable":8,buffer:void 0,debug:void 0,"js-base64":void 0,utf8:void 0}],8:[function(t,n,r){!function(u,o){if("function"==typeof e&&e.amd)e(["module","axios","debug","js-base64","es6-promise"],o);else if("undefined"!=typeof r)o(n,t("axios"),t("debug"),t("js-base64"),t("es6-promise"));else{var s={exports:{}};o(s,u.axios,u.debug,u.jsBase64,u.Promise),u.Requestable=s.exports}}(this,function(e,t,n,r,u){"use strict";function o(e){return e&&e.__esModule?e:{"default":e}}function s(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e){return-1!==v.indexOf(e)}function f(){var e=arguments.length<=0||void 0===arguments[0]?"":arguments[0],t=e.split(/\s*,\s*/);return t.reduce(function(e,t){return-1!==t.search(/rel="next"/)?(t.match(/<(.*)>/)||[])[1]:e},void 0)}function c(e,t){return function(n){d("error making request "+n.config.method+" "+n.config.url+" "+JSON.stringify(n.data));var r=new b(t,n);if(!e)throw d("throwing error"),r;d("going to error callback"),e(r)}}var h=o(t),_=o(n),p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e},y=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),d=(0,_["default"])("github:request");"undefined"==typeof Promise&&(0,u.polyfill)();var m=function(){function e(t,n){a(this,e),this.__apiBase=n||"https://api.github.com",this.__auth={token:t.token,username:t.username,password:t.password},t.token?this.__authorizationHeader="token "+t.token:t.username&&t.password&&(this.__authorizationHeader="Basic "+r.Base64.encode(t.username+":"+t.password))}return y(e,[{key:"__getURL",value:function(e){var t=e;-1===e.indexOf("//")&&(t=this.__apiBase+e);var n="timestamp="+(new Date).getTime();return t.replace(/(timestamp=\d+)/,n)}},{key:"__getRequestHeaders",value:function(e){var t={Accept:e?"application/vnd.github.v3.raw+json":"application/vnd.github.v3+json","Content-Type":"application/json;charset=UTF-8"};return this.__authorizationHeader&&(t.Authorization=this.__authorizationHeader),t}},{key:"_getOptionsWithDefaults",value:function(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];return e.visibility||e.affiliation||(e.type=e.type||"all"),e.sort=e.sort||"updated",e.per_page=e.per_page||"100",e}},{key:"_dateToISO",value:function(e){return e&&e instanceof Date&&(e=e.toISOString()),e}},{key:"_request",value:function(e,t,n,r,u){var o=this.__getURL(t),s=this.__getRequestHeaders(u),i={},a=n&&"object"===("undefined"==typeof n?"undefined":p(n))&&l(e);a&&(i=n,n=void 0);var f={url:o,method:e,headers:s,params:i,data:n,responseType:u?"text":"json"};d(f.method+" to "+f.url);var _=(0,h["default"])(f)["catch"](c(r,t));return r&&_.then(function(e){r(null,e.data||!0,e)}),_}},{key:"_request204or404",value:function(e,t,n){var r=arguments.length<=3||void 0===arguments[3]?"GET":arguments[3];return this._request(r,e,t).then(function(e){return n&&n(null,!0,e),!0},function(e){if(404===e.status)return n&&n(null,!1,e),!1;throw n&&n(e),e})}},{key:"_requestAllPages",value:function(e,t,n,r){var u=this;return r=r||[],this._request("GET",e,t).then(function(e){r.push.apply(r,e.data);var o=f(e.headers.link);return o?(d("getting next page: "+o),u._requestAllPages(o,t,n,r)):(n&&n(null,r,e),e.data=r,e)})["catch"](c(n,e))}}]),e}();e.exports=m;var b=function(e){function t(e,n){a(this,t);var r=s(this,Object.getPrototypeOf(t).call(this,"error making request "+n.config.method+" "+n.config.url));return r.path=e,r.request=n.config,r.response=n,r.status=n.status,r}return i(t,e),t}(Error),v=["GET","HEAD","DELETE"]})},{axios:void 0,debug:void 0,"es6-promise":void 0,"js-base64":void 0}],9:[function(t,n,r){!function(u,o){if("function"==typeof e&&e.amd)e(["module","./Requestable","debug"],o);else if("undefined"!=typeof r)o(n,t("./Requestable"),t("debug"));else{var s={exports:{}};o(s,u.Requestable,u.debug),u.Search=s.exports}}(this,function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var i=r(t),a=r(n),l=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),f=(0,a["default"])("github:search"),c=function(e){function t(e,n,r){u(this,t);var s=o(this,Object.getPrototypeOf(t).call(this,n,r));return s.__defaults=s._getOptionsWithDefaults(e),s}return s(t,e),l(t,[{key:"_search",value:function(e){var t=this,n=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],r=arguments.length<=2||void 0===arguments[2]?void 0:arguments[2],u={};return Object.keys(this.__defaults).forEach(function(e){u[e]=t.__defaults[e]}),Object.keys(n).forEach(function(e){u[e]=n[e]}),f("searching "+e+" with options:",u),this._requestAllPages("/search/"+e,u,r)}},{key:"forRepositories",value:function(e,t){return this._search("repositories",e,t)}},{key:"forCode",value:function(e,t){return this._search("code",e,t)}},{key:"forIssues",value:function(e,t){return this._search("issues",e,t)}},{key:"forUsers",value:function(e,t){return this._search("users",e,t)}}]),t}(i["default"]);e.exports=c})},{"./Requestable":8,debug:void 0}],10:[function(t,n,r){!function(u,o){if("function"==typeof e&&e.amd)e(["module","./Requestable","debug"],o);else if("undefined"!=typeof r)o(n,t("./Requestable"),t("debug"));else{var s={exports:{}};o(s,u.Requestable,u.debug),u.Team=s.exports}}(this,function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var i=r(t),a=r(n),l=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),f=(0,a["default"])("github:team"),c=function(e){function t(e,n,r){u(this,t);var s=o(this,Object.getPrototypeOf(t).call(this,n,r));return s.__teamId=e,s}return s(t,e),l(t,[{key:"getTeam",value:function(e){return f("Fetching Team "+this.__teamId),this._request("Get","/teams/"+this.__teamId,void 0,e)}},{key:"listRepos",value:function(e){return f("Fetching repositories for Team "+this.__teamId),this._requestAllPages("/teams/"+this.__teamId+"/repos",void 0,e)}},{key:"editTeam",value:function(e,t){return f("Editing Team "+this.__teamId),this._request("PATCH","/teams/"+this.__teamId,e,t)}},{key:"listMembers",value:function(e,t){return f("Getting members of Team "+this.__teamId),this._requestAllPages("/teams/"+this.__teamId+"/members",e,t)}},{key:"getMembership",value:function(e,t){return f("Getting membership of user "+e+" in Team "+this.__teamId),this._request("GET","/teams/"+this.__teamId+"/memberships/"+e,void 0,t)}},{key:"addMembership",value:function(e,t,n){return f("Adding user "+e+" to Team "+this.__teamId),this._request("PUT","/teams/"+this.__teamId+"/memberships/"+e,t,n)}},{key:"isManagedRepo",value:function(e,t,n){return f("Getting repo management by Team "+this.__teamId+" for repo "+e+"/"+t),this._request204or404("/teams/"+this.__teamId+"/repos/"+e+"/"+t,void 0,n)}},{key:"manageRepo",value:function(e,t,n,r){return f("Adding or Updating repo management by Team "+this.__teamId+" for repo "+e+"/"+t),this._request204or404("/teams/"+this.__teamId+"/repos/"+e+"/"+t,n,r,"PUT")}},{key:"unmanageRepo",value:function(e,t,n){return f("Remove repo management by Team "+this.__teamId+" for repo "+e+"/"+t),this._request204or404("/teams/"+this.__teamId+"/repos/"+e+"/"+t,void 0,n,"DELETE")}},{key:"deleteTeam",value:function(e){return f("Deleting Team "+this.__teamId),this._request204or404("/teams/"+this.__teamId,void 0,e,"DELETE")}}]),t}(i["default"]);e.exports=c})},{"./Requestable":8,debug:void 0}],11:[function(t,n,r){
!function(u,o){if("function"==typeof e&&e.amd)e(["module","./Requestable","debug"],o);else if("undefined"!=typeof r)o(n,t("./Requestable"),t("debug"));else{var s={exports:{}};o(s,u.Requestable,u.debug),u.User=s.exports}}(this,function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var i=r(t),a=r(n),l=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),f=(0,a["default"])("github:user"),c=function(e){function t(e,n,r){u(this,t);var s=o(this,Object.getPrototypeOf(t).call(this,n,r));return s.__user=e,s}return s(t,e),l(t,[{key:"__getScopedUrl",value:function(e){if(this.__user)return e?"/users/"+this.__user+"/"+e:"/users/"+this.__user;switch(e){case"":return"/user";case"notifications":case"gists":return"/"+e;default:return"/user/"+e}}},{key:"listRepos",value:function(e,t){return"function"==typeof e&&(t=e,e={}),e=this._getOptionsWithDefaults(e),f("Fetching repositories with options: "+JSON.stringify(e)),this._requestAllPages(this.__getScopedUrl("repos"),e,t)}},{key:"listOrgs",value:function(e){return this._request("GET",this.__getScopedUrl("orgs"),null,e)}},{key:"listGists",value:function(e){return this._request("GET",this.__getScopedUrl("gists"),null,e)}},{key:"listNotifications",value:function(e,t){return e=e||{},"function"==typeof e&&(t=e,e={}),e.since=this._dateToISO(e.since),e.before=this._dateToISO(e.before),this._request("GET",this.__getScopedUrl("notifications"),e,t)}},{key:"getProfile",value:function(e){return this._request("GET",this.__getScopedUrl(""),null,e)}},{key:"listStarredRepos",value:function(e){var t=this._getOptionsWithDefaults();return this._requestAllPages(this.__getScopedUrl("starred"),t,e)}},{key:"follow",value:function(e,t){return this._request("PUT","/user/following/"+this.__user,null,t)}},{key:"unfollow",value:function(e,t){return this._request("DELETE","/user/following/"+this.__user,null,t)}},{key:"createRepo",value:function(e,t){return this._request("POST","/user/repos",e,t)}}]),t}(i["default"]);e.exports=c})},{"./Requestable":8,debug:void 0}]},{},[2])(2)});
//# sourceMappingURL=GitHub.min.js.map

@@ -16,2 +16,3 @@ /**

import Organization from './Organization';
import Team from './Team';
import Markdown from './Markdown';

@@ -64,2 +65,11 @@

/**
* create a new Team wrapper
* @param {string} teamId - the name of the team
* @return {team}
*/
getTeam(teamId) {
return new Team(teamId, this.__auth, this.__apiBase);
}
/**
* Create a new Repository wrapper

@@ -66,0 +76,0 @@ * @param {string} user - the user who owns the respository

@@ -70,4 +70,30 @@ /**

}
/**
* List the Teams in the Organization
* @see https://developer.github.com/v3/orgs/teams/#list-teams
* @param {Requestable.callback} [cb] - will receive the list of teams
* @return {Promise} - the promise for the http request
*/
getTeams(cb) {
return this._requestAllPages(`/orgs/${this.__name}/teams`, undefined, cb);
}
/**
* Create a team
* @see https://developer.github.com/v3/orgs/teams/#create-team
* @param {object} options - Team creation parameters
* @param {string} options.name - The name of the team
* @param {string} [options.description] - Team description
* @param {string} [options.repo_names] - Repos to add the team to
* @param {string} [options.privacy=secret] - The level of privacy the team should have. Can be either one
* of: `secret`, or `closed`
* @param {Requestable.callback} [cb] - will receive the created team
* @return {Promise} - the promise for the http request
*/
createTeam(options, cb) {
return this._request('POST', `/orgs/${this.__name}/teams`, options, cb);
}
}
module.exports = Organization;

@@ -177,2 +177,14 @@ 'use strict';

/**
* Gets a single commit information for a repository
* @see https://developer.github.com/v3/repos/commits/#get-a-single-commit
* @param {string} ref - the reference for the commit-ish
* @param {Requestable.callback} cb - will receive the commit information
* @return {Promise} - the promise for the http request
*/
getSingleCommit(ref, cb) {
ref = ref || '';
return this._request('GET', `/repos/${this.__fullname}/commits/${ref}`, null, cb);
}
/**

@@ -179,0 +191,0 @@ * Get tha sha for a particular object in the repository. This is a convenience function

@@ -171,6 +171,7 @@ /**

* @param {Requestable.callback} cb - the callback that will receive `true` or `false`
* @param {method} [method=GET] - HTTP Method to use
* @return {Promise} - the promise for the http request
*/
_request204or404(path, data, cb) {
return this._request('GET', path, data)
_request204or404(path, data, cb, method = 'GET') {
return this._request(method, path, data)
.then(function success(response) {

@@ -177,0 +178,0 @@ if (cb) {

{
"name": "github-api",
"version": "2.0.0",
"version": "2.1.0",
"license": "BSD-3-Clause-Clear",

@@ -64,2 +64,3 @@ "description": "A higher-level wrapper around the Github API.",

"eslint-config-google": "^0.5.0",
"eslint-plugin-mocha": "^2.2.0",
"gulp": "^3.9.0",

@@ -66,0 +67,0 @@ "gulp-babel": "^6.1.2",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc