{"id":28558507,"url":"https://github.com/shelfio/gh-sdk","last_synced_at":"2025-06-10T08:09:04.911Z","repository":{"id":36954196,"uuid":"237004365","full_name":"shelfio/gh-sdk","owner":"shelfio","description":"Convenient wrapper for GitHub API for automation tasks","archived":false,"fork":false,"pushed_at":"2025-05-31T00:26:55.000Z","size":319,"stargazers_count":3,"open_issues_count":10,"forks_count":0,"subscribers_count":21,"default_branch":"master","last_synced_at":"2025-05-31T11:05:52.115Z","etag":null,"topics":["automation","github","npm-package"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/shelfio.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"license","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2020-01-29T14:40:01.000Z","updated_at":"2025-04-22T04:46:02.000Z","dependencies_parsed_at":"2024-01-04T02:35:56.067Z","dependency_job_id":"efa6c08c-e1c8-4a0f-b811-700dfd67b845","html_url":"https://github.com/shelfio/gh-sdk","commit_stats":null,"previous_names":[],"tags_count":20,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shelfio%2Fgh-sdk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shelfio%2Fgh-sdk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shelfio%2Fgh-sdk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shelfio%2Fgh-sdk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shelfio","download_url":"https://codeload.github.com/shelfio/gh-sdk/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shelfio%2Fgh-sdk/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259033838,"owners_count":22795772,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["automation","github","npm-package"],"created_at":"2025-06-10T08:09:02.885Z","updated_at":"2025-06-10T08:09:04.901Z","avatar_url":"https://github.com/shelfio.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gh-sdk [![CircleCI](https://circleci.com/gh/shelfio/gh-sdk/tree/master.svg?style=svg)](https://circleci.com/gh/shelfio/gh-sdk/tree/master)![](https://img.shields.io/badge/code_style-prettier-ff69b4.svg)\n\n\u003e Convenient wrapper for GitHub API for automation tasks\n\n## Install\n\n```\n$ yarn add @shelf/gh-sdk\n```\n\n## Usage\n\n```js\nimport { approvePR, mergePR, listPrs, getUserOrgs } from \"@shelf/gh-sdk\";\n\napprovePR({ owner: \"shelf\", repo: \"api\", pr: 3 });\nassignReleaseLabelToPR(\"shelf\", \"api\", 134);\ngetRepoMergeStrategies(\"shelf\", \"api\");\ncreateReleaseBranch({ owner: \"shelf\", repo: \"api\", version: \"1.2.3\", sha: \"dev\" }); // =\u003e ref 'refs/heads/release/v1.2.3` (refs/heads - for git link)\ncreateReleaseLabel(\"shelf\", \"api\");\ncreateReleasePR({ owner: \"shelf\", repo: \"api\", version: \"1.2.3\", releaseTitle: \"Good stuff\" }); // =\u003e ref: 'release/v1.2.3`, title: Release v1.2.3: Good stuff\ndeleteBranch({ owner: \"shelf\", repo: \"api\", ref: \"dev\" });\nextractRepoNameFromURL(\"https://github.com/shelfio/gh-sdk/pulls/5\"); // =\u003e gh-sdk\ngetLatestBranchCommit({ owner: \"shelf\", repo: \"api\", branch: \"dev\" });\ngetLatestDevelopCommit({ owner: \"shelf\", repo: \"api\" }); // {branch: 'develop} as default\ngetLatestDevelopCommitSHA({ owner: \"shelf\", repo: \"api\" }); // =\u003e 'develop-branch-hash-string'\ngetPR({ owner: \"shelf\", repo: \"api\", pr: 3 });\ngetRepoBranch({ owner: \"shelf\", repo: \"api\", branch: \"dev\" });\ngetRepoBranches({ owner: \"shelf\", repo: \"api\" }); // =\u003e [, {branch}]\ngetRepoBranchesNames({ owner: \"shelf\", repo: \"api\" }); // =\u003e [, 'branch-ref']\ngetRepoLabels(\"shelf\", \"api\");\ngetUserOrgs();\nlistClosedPRs({ owner: \"shelf\", searchText: \"renovate\" });\nlistOrgRepos({ org: \"shelfio\", type: \"sources\", skipArchived: true }); // =\u003e [, {repo}]\nlistPrs({ owner: \"shelf\", searchText: \"renovate\" });\nmergePR({ owner: \"shelf\", repo: \"api\", pr: 3 });\nupdateRepoMergeStrategies({\n  owner: 'shelfio',\n  repo: 'api',\n  allowMergeCommits: false,\n  allowSquash: false,\n  allowRebase: true,\n});\ngetOpenRepoPRsFromHuman('shelf', 'repo');\ngetCommitChecks('shelf', 'repo', 'sha');\ngetPRCommitRefsWithMessages('shelf', 'repo', 3);\n```\n\n## Publish\n\n```sh\n$ git checkout master\n$ yarn version\n$ yarn publish\n$ git push origin master --tags\n```\n\n## License\n\nMIT © [Shelf](https://shelf.io)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshelfio%2Fgh-sdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshelfio%2Fgh-sdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshelfio%2Fgh-sdk/lists"}