gh-sdk
Convenient wrapper for GitHub API for automation tasks
Install
$ yarn add @shelf/gh-sdk
Usage
const {approvePR, mergePR, listOpenPRs, getUserOrgs, ...} = require('@shelf/gh-sdk');
getUserOrgs();
listOrgRepos('shelf');
approvePR({owner: 'shelf', repo: 'api', pr: 3});
mergePR({owner: 'shelf', repo: 'api', pr: 3});
listOpenPRs({owner: 'shelf', searchText: 'renovate'});
getRepoBranch({owner: 'shelf', repo: 'api', branch: 'dev'});
getRepoBranches({owner: 'shelf', repo: 'api'});
getRepoBranchesNames({owner: 'shelf', repo: 'api'});
deleteBranch({owner: 'shelf', repo: 'api', ref: 'dev'});
createReleaseBranch({owner:'shelf', repo: 'api', version: '1.2.3', sha: 'dev'})
createReleasePR({owner:'shelf', repo: 'api', version: '1.2.3', releaseTitle: 'Good stuff'})
getLatestBranchCommit({owner: 'shelf', repo: 'api', branch: 'dev'});
getLatestDevelopCommit({owner: 'shelf', repo: 'api'})
getLatestDevelopCommitSHA({owner: 'shelf', repo: 'api'})
Publish
$ yarn version
$ yarn publish
License
MIT © Shelf