Socket
Socket
Sign inDemoInstall

@shelf/gh-sdk

Package Overview
Dependencies
Maintainers
58
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
Maintainers
58
Created
Source

gh-sdk CircleCI

Convenient wrapper for GitHub API for automation tasks

Install

$ yarn add @shelf/gh-sdk

Usage

import { approvePR, mergePR, listPrs, getUserOrgs } from "@shelf/gh-sdk";

approvePR({ owner: "shelf", repo: "api", pr: 3 });
assignReleaseLabelToPR("shelf", "api", 134);
getRepoMergeStrategies("shelf", "api");
createReleaseBranch({ owner: "shelf", repo: "api", version: "1.2.3", sha: "dev" }); // => ref 'refs/heads/release/v1.2.3` (refs/heads - for git link)
createReleaseLabel("shelf", "api");
createReleasePR({ owner: "shelf", repo: "api", version: "1.2.3", releaseTitle: "Good stuff" }); // => ref: 'release/v1.2.3`, title: Release v1.2.3: Good stuff
deleteBranch({ owner: "shelf", repo: "api", ref: "dev" });
extractRepoNameFromURL("https://github.com/shelfio/gh-sdk/pulls/5"); // => gh-sdk
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'
getPR({ owner: "shelf", repo: "api", pr: 3 });
getRepoBranch({ owner: "shelf", repo: "api", branch: "dev" });
getRepoBranches({ owner: "shelf", repo: "api" }); // => [, {branch}]
getRepoBranchesNames({ owner: "shelf", repo: "api" }); // => [, 'branch-ref']
getRepoLabels("shelf", "api");
getUserOrgs();
listClosedPRs({ owner: "shelf", searchText: "renovate" });
listOrgRepos({ org: "shelfio", type: "sources", skipArchived: true }); // => [, {repo}]
listPrs({ owner: "shelf", searchText: "renovate" });
mergePR({ owner: "shelf", repo: "api", pr: 3 });
updateRepoMergeStrategies({
  owner: 'shelfio',
  repo: 'api',
  allowMergeCommits: false,
  allowSquash: false,
  allowRebase: true,
});
getOpenRepoPRsFromHuman('shelf', 'repo');
getCommitChecks('shelf', 'repo', 'sha');
getPRCommitRefsWithMessages('shelf', 'repo', 3);

Publish

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

License

MIT © Shelf

FAQs

Package last updated on 17 Apr 2024

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