Socket
Socket
Sign inDemoInstall

github-api

Package Overview
Dependencies
Maintainers
5
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.2.0 to 2.3.0

7

CHANGELOG.md
# Change Log
## 2.3.0 - 2016/06/17
### Features
* add `Repository.mergePullRequest`
* add `Repository.updatePullRequest`
* add `Repository.listPullRequestFiles`
* add `Repository.getReadme`
## 2.2.0 - 2016/05/27

@@ -4,0 +11,0 @@ ### Features

2

dist/components/GitHub.js

@@ -151,3 +151,3 @@ (function (global, factory) {

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

@@ -1,3 +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","./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:"listIssueEvents",value:function(e,t){return this._request("GET","/repos/"+this.__repository+"/issues/"+e+"/events",null,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 instanceof t))throw new TypeError("Cannot call a class as a function")}function i(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 a(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 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){var r="error making request "+n.config.method+" "+n.config.url,u=new m(r,t,n);if(d(r+" "+JSON.stringify(n.data)),!e)throw d("throwing error"),u;d("going to error callback"),e(u)}}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(e){function t(e,n,r){s(this,t);var u=i(this,Object.getPrototypeOf(t).call(this,e));return u.path=n,u.request=r.config,u.response=r,u.status=r.status,u}return a(t,e),t}(Error),b=function(){function e(t,n){s(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(o){var s=void 0;if(o.data instanceof Array)s=o.data;else{if(!(o.data.items instanceof Array)){var i="cannot figure out how to append "+o.data+" to the result set";throw new m(i,e,o)}s=o.data.items}r.push.apply(r,s);var a=f(o.headers.link);return a?(d("getting next page: "+a),u._requestAllPages(a,t,n,r)):(n&&n(null,r,o),o.data=r,o)})["catch"](c(n,e))}}]),e}();e.exports=b;var 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)});
!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(o,i){if(!n[o]){if(!e[o]){var a="function"==typeof require&&require;if(!i&&a)return a(o,!0);if(s)return s(o,!0);var l=new Error("Cannot find module '"+o+"'");throw l.code="MODULE_NOT_FOUND",l}var f=n[o]={exports:{}};e[o][0].call(f.exports,function(t){var n=e[o][1][t];return u(n?n:t)},f,f.exports,t,e,n,r)}return n[o].exports}for(var s="function"==typeof require&&require,o=0;o<r.length;o++)u(r[o]);return u}({1:[function(t,n,r){!function(u,s){if("function"==typeof e&&e.amd)e(["module","./Requestable"],s);else if("undefined"!=typeof r)s(n,t("./Requestable"));else{var o={exports:{}};s(o,u.Requestable),u.Gist=o.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 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 o=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,s){r(this,t);var o=u(this,Object.getPrototypeOf(t).call(this,n,s));return o.__id=e,o}return s(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}(o["default"]);e.exports=a})},{"./Requestable":8}],2:[function(t,n,r){!function(u,s){if("function"==typeof e&&e.amd)e(["module","./Gist","./User","./Issue","./Search","./RateLimit","./Repository","./Organization","./Team","./Markdown"],s);else if("undefined"!=typeof r)s(n,t("./Gist"),t("./User"),t("./Issue"),t("./Search"),t("./RateLimit"),t("./Repository"),t("./Organization"),t("./Team"),t("./Markdown"));else{var o={exports:{}};s(o,u.Gist,u.User,u.Issue,u.Search,u.RateLimit,u.Repository,u.Organization,u.Team,u.Markdown),u.GitHub=o.exports}}(this,function(e,t,n,r,u,s,o,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(s),m=f(o),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,s){if("function"==typeof e&&e.amd)e(["module","./Requestable"],s);else if("undefined"!=typeof r)s(n,t("./Requestable"));else{var o={exports:{}};s(o,u.Requestable),u.Issue=o.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 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 o=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,s){r(this,t);var o=u(this,Object.getPrototypeOf(t).call(this,n,s));return o.__repository=e,o}return s(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:"listIssueEvents",value:function(e,t){return this._request("GET","/repos/"+this.__repository+"/issues/"+e+"/events",null,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}(o["default"]);e.exports=a})},{"./Requestable":8}],4:[function(t,n,r){!function(u,s){if("function"==typeof e&&e.amd)e(["module","./Requestable"],s);else if("undefined"!=typeof r)s(n,t("./Requestable"));else{var o={exports:{}};s(o,u.Requestable),u.Markdown=o.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 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 o=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 s(t,e),i(t,[{key:"render",value:function(e,t){return this._request("POST","/markdown",e,t)}}]),t}(o["default"]);e.exports=a})},{"./Requestable":8}],5:[function(t,n,r){!function(u,s){if("function"==typeof e&&e.amd)e(["module","./Requestable"],s);else if("undefined"!=typeof r)s(n,t("./Requestable"));else{var o={exports:{}};s(o,u.Requestable),u.Organization=o.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 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 o=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,s){r(this,t);var o=u(this,Object.getPrototypeOf(t).call(this,n,s));return o.__name=e,o}return s(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}(o["default"]);e.exports=a})},{"./Requestable":8}],6:[function(t,n,r){!function(u,s){if("function"==typeof e&&e.amd)e(["module","./Requestable"],s);else if("undefined"!=typeof r)s(n,t("./Requestable"));else{var o={exports:{}};s(o,u.Requestable),u.RateLimit=o.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 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 o=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 s(t,e),i(t,[{key:"getRateLimit",value:function(e){return this._request("GET","/rate_limit",null,e)}}]),t}(o["default"]);e.exports=a})},{"./Requestable":8}],7:[function(t,n,r){(function(u){!function(u,s){if("function"==typeof e&&e.amd)e(["module","./Requestable","utf8","js-base64","debug"],s);else if("undefined"!=typeof r)s(n,t("./Requestable"),t("utf8"),t("js-base64"),t("debug"));else{var o={exports:{}};s(o,u.Requestable,u.utf8,u.jsBase64,u.debug),u.Repository=o.exports}}(this,function(e,t,n,r,s){"use strict";function o(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=o(t),c=o(n),h=o(s),_="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:"listPullRequestFiles",value:function(e,t){return this._request("GET","/repos/"+this.__fullname+"/pulls/"+e+"/files",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,s={message:n,tree:t,parents:[e]};return this._request("POST","/repos/"+this.__fullname+"/git/commits",s,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:"getReadme",value:function(e,t,n){return this._request("GET","/repos/"+this.__fullname+"/readme",{ref:e},n,t)}},{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:"updatePullRequst",value:function(e,t,n){return this._request("PATCH","/repos/"+this.__fullname+"/pulls/"+e,t,n)}},{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 s={message:"Delete the file at '"+t+"'",sha:u.data.sha,branch:e};return r._request("DELETE","/repos/"+r.__fullname+"/contents/"+t,s,n)})}},{key:"move",value:function(e,t,n,r){var u=this,s=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,o=r.tree,i=r.sha;s=i;var a=o.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(s,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,s,o){var i=this;"function"==typeof s&&(o=s,s={});var a=t?encodeURI(t):"",l=s.encode!==!1,f={branch:e,message:u,author:s.author,committer:s.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,o)},function(){return i._request("PUT","/repos/"+i.__fullname+"/contents/"+a,f,o)})}},{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)}},{key:"mergePullRequest",value:function(e,t,n){return this._request("PUT","/repos/"+this.__fullname+"/pulls/"+e+"/merge",t,n)}}]),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,s){if("function"==typeof e&&e.amd)e(["module","axios","debug","js-base64","es6-promise"],s);else if("undefined"!=typeof r)s(n,t("axios"),t("debug"),t("js-base64"),t("es6-promise"));else{var o={exports:{}};s(o,u.axios,u.debug,u.jsBase64,u.Promise),u.Requestable=o.exports}}(this,function(e,t,n,r,u){"use strict";function s(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(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 a(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 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){var r="error making request "+n.config.method+" "+n.config.url,u=new m(r,t,n);if(d(r+" "+JSON.stringify(n.data)),!e)throw d("throwing error"),u;d("going to error callback"),e(u)}}var h=s(t),_=s(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(e){function t(e,n,r){o(this,t);var u=i(this,Object.getPrototypeOf(t).call(this,e));return u.path=n,u.request=r.config,u.response=r,u.status=r.status,u}return a(t,e),t}(Error),b=function(){function e(t,n){o(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 s=this.__getURL(t),o=this.__getRequestHeaders(u),i={},a=n&&"object"===("undefined"==typeof n?"undefined":p(n))&&l(e);a&&(i=n,n=void 0);var f={url:s,method:e,headers:o,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(s){var o=void 0;if(s.data instanceof Array)o=s.data;else{if(!(s.data.items instanceof Array)){var i="cannot figure out how to append "+s.data+" to the result set";throw new m(i,e,s)}o=s.data.items}r.push.apply(r,o);var a=f(s.headers.link);return a?(d("getting next page: "+a),u._requestAllPages(a,t,n,r)):(n&&n(null,r,s),s.data=r,s)})["catch"](c(n,e))}}]),e}();e.exports=b;var 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,s){if("function"==typeof e&&e.amd)e(["module","./Requestable","debug"],s);else if("undefined"!=typeof r)s(n,t("./Requestable"),t("debug"));else{var o={exports:{}};s(o,u.Requestable,u.debug),u.Search=o.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 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 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 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 o=s(this,Object.getPrototypeOf(t).call(this,n,r));return o.__defaults=o._getOptionsWithDefaults(e),o}return o(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,s){if("function"==typeof e&&e.amd)e(["module","./Requestable","debug"],s);else if("undefined"!=typeof r)s(n,t("./Requestable"),t("debug"));else{var o={exports:{}};s(o,u.Requestable,u.debug),u.Team=o.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 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 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 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 o=s(this,Object.getPrototypeOf(t).call(this,n,r));return o.__teamId=e,o}return o(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,s){if("function"==typeof e&&e.amd)e(["module","./Requestable","debug"],s);else if("undefined"!=typeof r)s(n,t("./Requestable"),t("debug"));else{var o={exports:{}};s(o,u.Requestable,u.debug),u.User=o.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 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 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 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 o=s(this,Object.getPrototypeOf(t).call(this,n,r));return o.__user=e,o}return o(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

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

* @param {string} organization - the name of the organization
* @param {string} foo - this
* @return {Organization}

@@ -59,0 +58,0 @@ */

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

'use strict';
/**

@@ -113,2 +112,13 @@ * @file

/**
* List the files of a specific pull request
* @see https://developer.github.com/v3/pulls/#list-pull-requests-files
* @param {number|string} number - the PR you wish to fetch
* @param {Requestable.callback} [cb] - will receive the list of files from the API
* @return {Promise} - the promise for the http request
*/
listPullRequestFiles(number, cb) {
return this._request('GET', `/repos/${this.__fullname}/pulls/${number}/files`, null, cb);
}
/**
* Compare two branches/commits/repositories

@@ -317,3 +327,3 @@ * @see https://developer.github.com/v3/repos/commits/#compare-two-commits

* @param {string} message - the commit message
* @param {Function} cb - will receive the commit that is created
* @param {Requestable.callback} cb - will receive the commit that is created
* @return {Promise} - the promise for the http request

@@ -341,3 +351,3 @@ */

* @param {boolean} force - indicates whether to force or ensure a fast-forward update
* @param {Function} cb - will receive the updated ref back
* @param {Requestable.callback} cb - will receive the updated ref back
* @return {Promise} - the promise for the http request

@@ -355,3 +365,3 @@ */

* @see https://developer.github.com/v3/repos/#get
* @param {Function} cb - will receive the information about the repository
* @param {Requestable.callback} cb - will receive the information about the repository
* @return {Promise} - the promise for the http request

@@ -366,3 +376,3 @@ */

* @see https://developer.github.com/v3/repos/#list-contributors
* @param {Function} cb - will receive the list of contributors
* @param {Requestable.callback} cb - will receive the list of contributors
* @return {Promise} - the promise for the http request

@@ -378,3 +388,3 @@ */

* @see https://developer.github.com/v3/repos/collaborators/#list-collaborators
* @param {Function} cb - will receive the list of collaborators
* @param {Requestable.callback} cb - will receive the list of collaborators
* @return {Promise} - the promise for the http request

@@ -390,3 +400,3 @@ */

* @param {string} username - the user to check
* @param {Function} cb - will receive true if the user is a collaborator and false if they are not
* @param {Requestable.callback} cb - will receive true if the user is a collaborator and false if they are not
* @return {Promise} - the promise for the http request {Boolean} [description]

@@ -404,3 +414,3 @@ */

* @param {boolean} raw - `true` if the results should be returned raw instead of GitHub's normalized format
* @param {Function} cb - will receive the fetched data
* @param {Requestable.callback} cb - will receive the fetched data
* @return {Promise} - the promise for the http request

@@ -416,5 +426,19 @@ */

/**
* Get the README of a repository
* @see https://developer.github.com/v3/repos/contents/#get-the-readme
* @param {string} ref - the ref to check
* @param {boolean} raw - `true` if the results should be returned raw instead of GitHub's normalized format
* @param {Requestable.callback} cb - will receive the fetched data
* @return {Promise} - the promise for the http request
*/
getReadme(ref, raw, cb) {
return this._request('GET', `/repos/${this.__fullname}/readme`, {
ref
}, cb, raw);
}
/**
* Fork a repository
* @see https://developer.github.com/v3/repos/forks/#create-a-fork
* @param {Function} cb - will receive the information about the newly created fork
* @param {Requestable.callback} cb - will receive the information about the newly created fork
* @return {Promise} - the promise for the http request

@@ -429,3 +453,3 @@ */

* @see https://developer.github.com/v3/repos/forks/#list-forks
* @param {Function} cb - will receive the list of repositories forked from this one
* @param {Requestable.callback} cb - will receive the list of repositories forked from this one
* @return {Promise} - the promise for the http request

@@ -441,3 +465,3 @@ */

* @param {string} newBranch - the name of the new branch
* @param {Function} cb - will receive the commit data for the head of the new branch
* @param {Requestable.callback} cb - will receive the commit data for the head of the new branch
* @return {Promise} - the promise for the http request

@@ -466,3 +490,3 @@ */

* @param {Object} options - the pull request description
* @param {Function} cb - will receive the new pull request
* @param {Requestable.callback} cb - will receive the new pull request
* @return {Promise} - the promise for the http request

@@ -475,5 +499,17 @@ */

/**
* Update a pull request
* @see https://developer.github.com/v3/pulls/#update-a-pull-request
* @param {number|string} number - the number of the pull request to update
* @param {Object} options - the pull request description
* @param {Requestable.callback} [cb] - will receive the pull request information
* @return {Promise} - the promise for the http request
*/
updatePullRequst(number, options, cb) {
return this._request('PATCH', `/repos/${this.__fullname}/pulls/${number}`, options, cb);
}
/**
* List the hooks for the repository
* @see https://developer.github.com/v3/repos/hooks/#list-hooks
* @param {Function} cb - will receive the list of hooks
* @param {Requestable.callback} cb - will receive the list of hooks
* @return {Promise} - the promise for the http request

@@ -489,3 +525,3 @@ */

* @param {number} id - the id of the webook
* @param {Function} cb - will receive the details of the webook
* @param {Requestable.callback} cb - will receive the details of the webook
* @return {Promise} - the promise for the http request

@@ -501,3 +537,3 @@ */

* @param {Object} options - the configuration describing the new hook
* @param {Function} cb - will receive the new webhook
* @param {Requestable.callback} cb - will receive the new webhook
* @return {Promise} - the promise for the http request

@@ -514,3 +550,3 @@ */

* @param {Object} options - the new description of the webhook
* @param {Function} cb - will receive the updated webhook
* @param {Requestable.callback} cb - will receive the updated webhook
* @return {Promise} - the promise for the http request

@@ -526,3 +562,3 @@ */

* @param {number} id - the id of the webhook to be deleted
* @param {Function} cb - will receive true if the call is successful
* @param {Requestable.callback} cb - will receive true if the call is successful
* @return {Promise} - the promise for the http request

@@ -539,3 +575,3 @@ */

* @param {string} path - the path of the file to remove
* @param {Function} cb - will receive the commit in which the delete occurred
* @param {Requestable.callback} cb - will receive the commit in which the delete occurred
* @return {Promise} - the promise for the http request

@@ -560,3 +596,3 @@ */

* @param {string} newPath - new reference path
* @param {Function} cb - will receive the commit in which the move occurred
* @param {Requestable.callback} cb - will receive the commit in which the move occurred
* @return {Promise} - the promise for the http request

@@ -596,3 +632,3 @@ */

* @param {boolean} [options.encode] - true if the content should be base64 encoded
* @param {Function} cb - will receive the new commit
* @param {Requestable.callback} cb - will receive the new commit
* @return {Promise} - the promise for the http request

@@ -709,4 +745,16 @@ */

}
/**
* Merge a pull request
* @see https://developer.github.com/v3/pulls/#merge-a-pull-request-merge-button
* @param {number|string} number - the number of the pull request to merge
* @param {Object} options - the merge options for the pull request
* @param {Requestable.callback} [cb] - will receive the merge information if the operation is successful
* @return {Promise} - the promise for the http request
*/
mergePullRequest(number, options, cb) {
return this._request('PUT', `/repos/${this.__fullname}/pulls/${number}/merge`, options, cb);
}
}
module.exports = Repository;
{
"name": "github-api",
"version": "2.2.0",
"version": "2.3.0",
"license": "BSD-3-Clause-Clear",

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

],
"gitHead": "aa8aa3c8cd5ce5240373d4fd1d06a7ab4af41a36",
"bugs": {

@@ -91,0 +90,0 @@ "url": "https://github.com/michael/github/issues"

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 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