{"id":20879750,"url":"https://github.com/ryohidaka/gitbeaker-hooks","last_synced_at":"2026-03-04T14:31:01.742Z","repository":{"id":231089804,"uuid":"780177573","full_name":"ryohidaka/gitbeaker-hooks","owner":"ryohidaka","description":"React Hooks library for Gitbeaker.","archived":false,"fork":false,"pushed_at":"2025-03-10T04:25:03.000Z","size":228,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-25T04:55:11.311Z","etag":null,"topics":["git","gitbeaker","gitlab","react","react-hooks"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/gitbeaker-hooks","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/ryohidaka.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","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},"funding":{"github":["ryohidaka"],"patreon":null,"open_collective":null,"ko_fi":"ryohidaka","tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"lfx_crowdfunding":null,"custom":null}},"created_at":"2024-03-31T22:53:51.000Z","updated_at":"2025-01-03T09:26:56.000Z","dependencies_parsed_at":"2024-04-02T12:44:31.448Z","dependency_job_id":"6b5bb3b0-0b5d-4409-9a25-c99aeb2561de","html_url":"https://github.com/ryohidaka/gitbeaker-hooks","commit_stats":null,"previous_names":["ryohidaka/gitbeaker-hooks"],"tags_count":6,"template":false,"template_full_name":"ryohidaka/react-package-template","purl":"pkg:github/ryohidaka/gitbeaker-hooks","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryohidaka%2Fgitbeaker-hooks","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryohidaka%2Fgitbeaker-hooks/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryohidaka%2Fgitbeaker-hooks/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryohidaka%2Fgitbeaker-hooks/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ryohidaka","download_url":"https://codeload.github.com/ryohidaka/gitbeaker-hooks/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryohidaka%2Fgitbeaker-hooks/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30083737,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-04T13:22:36.021Z","status":"ssl_error","status_checked_at":"2026-03-04T13:20:45.750Z","response_time":59,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["git","gitbeaker","gitlab","react","react-hooks"],"created_at":"2024-11-18T07:17:39.840Z","updated_at":"2026-03-04T14:31:01.645Z","avatar_url":"https://github.com/ryohidaka.png","language":"TypeScript","funding_links":["https://github.com/sponsors/ryohidaka","https://ko-fi.com/ryohidaka","https://ko-fi.com/B0B6TVH92"],"categories":[],"sub_categories":[],"readme":"# gitbeaker-hooks\n\n[![npm version](https://badge.fury.io/js/gitbeaker-hooks.svg)](https://badge.fury.io/js/gitbeaker-hooks)\n![build](https://github.com/ryohidaka/gitbeaker-hooks/workflows/Build/badge.svg)\n[![codecov](https://codecov.io/gh/ryohidaka/gitbeaker-hooks/graph/badge.svg?token=RHP9TB2F51)](https://codecov.io/gh/ryohidaka/gitbeaker-hooks)\n[![License](https://img.shields.io/badge/license-MIT-blue.svg)](https://opensource.org/licenses/MIT)\n\n[![ko-fi](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/B0B6TVH92)\n\n## Overview\n\nReact Hooks library for [Gitbeaker](https://github.com/jdalrymple/gitbeaker).\n\n## Installation\n\nYou can install this library using npm:\n\n```shell\nnpm install gitbeaker-hooks\n```\n\n## Usage\n\nWrap your app with the `GitbeakerProvider` and provide options object with `token` property.\n\n```tsx\nimport { GitbeakerProvider } from \"gitbeaker-hooks\";\n\nconst gitbeakerOptions = {\n  token: \"your-access-token\",\n};\n\nReactDOM.render(\n  \u003cReact.StrictMode\u003e\n    \u003cGitbeakerProvider options={gitbeakerOptions}\u003e\n      \u003cApp /\u003e\n    \u003c/GitbeakerProvider\u003e\n  \u003c/React.StrictMode\u003e,\n  document.getElementById(\"root\"),\n);\n```\n\nUse the provided hooks to fetch GitLab data:\n\n- useProjects\n- useRepositoryTrees\n- useBranches\n\n```tsx\nimport { useProjects } from \"gitbeaker-hooks\";\n\nfunction App() {\n  const { projects, isLoading } = useProjects();\n\n  if (isLoading) {\n    return \u003cdiv\u003eLoading...\u003c/div\u003e;\n  }\n  return (\n    \u003c\u003e\n      \u003cul\u003e\n        {projects?.map((project) =\u003e \u003cli key={project.id}\u003e{project.name}\u003c/li\u003e)}\n      \u003c/ul\u003e\n    \u003c/\u003e\n  );\n}\n\nexport default App;\n```\n\n## API\n\n### Hooks\n\n- `useProjects(options)` - Fetch multiple projects.\n\n- `useRepositoryTrees(projectId, options)` - Get a list of repository files and directories in a project.\n\n- `useBranches(projectId, options)` - Get a list of repository branches from a project, sorted by name alphabetically.\n\n### GitbeakerProvider\n\nThe `GitbeakerProvider` component should be used to wrap your app and provide the `options` object. The `options` object must include the `token` property.\n\n## Link\n\n- [Gitbeaker](https://github.com/jdalrymple/gitbeaker)\n- [@gitbeaker/rest](https://www.npmjs.com/package/@gitbeaker/rest)\n- [Docs for GitLab REST API](https://archives.docs.gitlab.com/16.4/ee/api/rest/)\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fryohidaka%2Fgitbeaker-hooks","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fryohidaka%2Fgitbeaker-hooks","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fryohidaka%2Fgitbeaker-hooks/lists"}