Security News
ESLint is Now Language-Agnostic: Linting JSON, Markdown, and Beyond
ESLint has added JSON and Markdown linting support with new officially-supported plugins, expanding its versatility beyond JavaScript.
github-api-promise
Advanced tools
A node module for interfacing with the Github API using promises. The full GitHub API documentation can be found at https://developer.github.com/v3/.
npm install github-api-promise
TLDR;
Basic example code:
var api = require('github-api-promise');
// Set settings
api.config.owner = 'OwnersGithubUsername';
api.config.repo = 'RepoName';
api.config.token = 'YourAccessToken';
api.config.debug = true; // Default is false. Logs request information via console.log when true.
// Do stuff
api.repos.releases.getRepositoryReleases()
.then(function(res) {
// Do your stuff here. res is the JSON object returned by the API
},
function(err) {
console.log('Request failed: ' + err);
});
For help creating an access token, see the GitHub help article Creating an Access Token for Command Line Use. This package only requires either the repo scope for private repos or the public_repo scope for public repos.
The following APIs are supported. PRs welcome!
TODO: JSDoc on github pages
Special thanks to jeejkang for the Stormtroopocat image!
Thanks to aktau/github-release (a library for GO) for the inspiration for this project.
FAQs
A node module for interfacing with the Github API
We found that github-api-promise demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
ESLint has added JSON and Markdown linting support with new officially-supported plugins, expanding its versatility beyond JavaScript.
Security News
Members Hub is conducting large-scale campaigns to artificially boost Discord server metrics, undermining community trust and platform integrity.
Security News
NIST has failed to meet its self-imposed deadline of clearing the NVD's backlog by the end of the fiscal year. Meanwhile, CVE's awaiting analysis have increased by 33% since June.