Socket
Socket
Sign inDemoInstall

github-org-stats

Package Overview
Dependencies
12
Maintainers
2
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.1.0 to 0.2.0

21

lib/GithubOrgStats.js

@@ -20,2 +20,16 @@ 'use strict';

this.authenticate = function () {
return new Promise(function (resolve, reject) {
try {
_this.github.authenticate({
type: 'token',
token: _this.token
});
resolve();
} catch (e) {
reject(e);
}
});
};
this.getOrgRepos = function () {

@@ -43,2 +57,4 @@ return _this.github.repos.getForOrg({ org: _this.org, per_page: 100 });

};
}, function (error) {
return Promise.reject(error);
});

@@ -51,9 +67,4 @@ };

this.github = (0, _github2.default)();
this.github.authenticate({
type: 'token',
token: token
});
};
exports.default = GithubOrgStats;
{
"name": "github-org-stats",
"version": "0.1.0",
"version": "0.2.0",
"description": "Gather statistics for your github organization",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

@@ -34,4 +34,4 @@ # github-org-stats

"totalStars": 3084,
"repos": [ { "name": 'grommet', "stars": 2543 }, ... ],
"repos": [ { "name": "grommet", "stars": 2543 } ],
}
```

@@ -9,6 +9,14 @@ import Github from 'github';

this.github = Github();
this.github.authenticate({
type: 'token',
token: token,
}
authenticate = () => {
return new Promise((resolve, reject) => {
try {
this.github.authenticate({
type: 'token',
token: this.token,
});
resolve();
} catch(e) {
reject(e);
}
});

@@ -33,4 +41,4 @@ }

}
});
}, error => Promise.reject(error));
}
}

@@ -8,2 +8,6 @@ import GithubOrgStats from '../src/GithubOrgStats';

githubOrgStats.get().then(result => console.log(result));
githubOrgStats
.authenticate()
.then(() => githubOrgStats.get())
.then(result => console.log(result))
.catch(error => console.log(error));
SocketSocket SOC 2 Logo

Product

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc