Socket
Socket
Sign inDemoInstall

@shelf/gh-sdk

Package Overview
Dependencies
Maintainers
11
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@shelf/gh-sdk

Convenient wrapper for GitHub API for automation tasks


Version published
Weekly downloads
39
decreased by-4.88%
Maintainers
11
Weekly downloads
 
Created
Source

gh-sdk CircleCI

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');                                      // => [, {repo}]
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'});            // => [, {branch}]
getRepoBranchesNames({owner: 'shelf', repo: 'api'});       // => [, 'branch-ref']
deleteBranch({owner: 'shelf', repo: 'api', ref: 'dev'});
createReleaseBranch({owner:'shelf', repo: 'api', version: '1.2.3', sha: 'dev'})  // => ref 'refs/heads/release/v1.2.3` (refs/heads - for git link)
createReleasePR({owner:'shelf', repo: 'api', version: '1.2.3', releaseTitle: 'Good stuff'})  //=> ref: 'release/v1.2.3`, title: Release v1.2.3: Good stuff
getLatestBranchCommit({owner: 'shelf', repo: 'api', branch: 'dev'});
getLatestDevelopCommit({owner: 'shelf', repo: 'api'})      //{branch: 'develop} as default
getLatestDevelopCommitSHA({owner: 'shelf', repo: 'api'})   // => 'develop-branch-hash-string'

Publish

$ git checkout master
$ yarn version
$ yarn publish
$ git push origin master

License

MIT © Shelf

FAQs

Package last updated on 23 Oct 2020

Did you know?

Socket

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.

Install

Related posts

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