{"id":15954900,"url":"https://github.com/abhyudayasharma/react-git-info","last_synced_at":"2025-03-16T07:31:48.004Z","repository":{"id":44627873,"uuid":"234695008","full_name":"AbhyudayaSharma/react-git-info","owner":"AbhyudayaSharma","description":"Get Git commit information in your React App","archived":false,"fork":false,"pushed_at":"2022-10-12T15:42:38.000Z","size":62,"stargazers_count":53,"open_issues_count":5,"forks_count":8,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-27T05:25:17.918Z","etag":null,"topics":["babel-plugin-macros","create-react-app","gatsby","gatsbyjs","git","git-branch","git-commit","git-info","git-tags","hacktoberfest","react","typescript-support"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/react-git-info","language":"JavaScript","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/AbhyudayaSharma.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-01-18T06:57:24.000Z","updated_at":"2025-02-26T15:59:28.000Z","dependencies_parsed_at":"2023-01-19T23:02:07.537Z","dependency_job_id":null,"html_url":"https://github.com/AbhyudayaSharma/react-git-info","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AbhyudayaSharma%2Freact-git-info","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AbhyudayaSharma%2Freact-git-info/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AbhyudayaSharma%2Freact-git-info/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AbhyudayaSharma%2Freact-git-info/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AbhyudayaSharma","download_url":"https://codeload.github.com/AbhyudayaSharma/react-git-info/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243806035,"owners_count":20350775,"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":["babel-plugin-macros","create-react-app","gatsby","gatsbyjs","git","git-branch","git-commit","git-info","git-tags","hacktoberfest","react","typescript-support"],"created_at":"2024-10-07T13:20:27.378Z","updated_at":"2025-03-16T07:31:47.364Z","avatar_url":"https://github.com/AbhyudayaSharma.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# react-git-info\n\n[![npm version](https://badge.fury.io/js/react-git-info.svg)](https://badge.fury.io/js/react-git-info)\n![Node.js CI](https://github.com/AbhyudayaSharma/react-git-info/workflows/Node.js%20CI/badge.svg)\n\nGet git commit information in your React Application as a JavaScript object.\nNo configuration necessary if you use create-react-app.\n\n## Usage\n\nYou need to install this repository as an NPM `devDependency`:\n\n```bash\nnpm install --save-dev react-git-info\n```\n\nAfter that you can import the information to your static React files.\n\n```jsx\nimport GitInfo from 'react-git-info/macro';\n\nconst gitInfo = GitInfo();\nconsole.log(gitInfo.branch);\nconsole.log(gitInfo.tags);\nconsole.log(gitInfo.commit.date);\nconsole.log(gitInfo.commit.hash);\nconsole.log(gitInfo.commit.message);\nconsole.log(gitInfo.commit.shortHash);\n\n// or from JSX\n\u003cp\u003e{gitInfo.commit.message}\u003c/p\u003e\n```\n\n### TypeScript Support\n\nThere is built-in TypeScript support, you won't have to install external types.\n\n## How it works\n\nThis package uses a `babel-plugin-macros` macro that is preconfigured when\nyou're using a recent version of `create-react-app`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabhyudayasharma%2Freact-git-info","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fabhyudayasharma%2Freact-git-info","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabhyudayasharma%2Freact-git-info/lists"}