{"id":13846265,"url":"https://github.com/pusher/git-store","last_synced_at":"2025-12-30T06:26:08.179Z","repository":{"id":66022327,"uuid":"144010162","full_name":"pusher/git-store","owner":"pusher","description":"Go git abstraction for use in Kubernetes Controllers","archived":false,"fork":false,"pushed_at":"2019-09-13T13:18:05.000Z","size":458,"stargazers_count":9,"open_issues_count":0,"forks_count":1,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-07-11T05:38:00.833Z","etag":null,"topics":["cloud-infrastructure"],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pusher.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","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}},"created_at":"2018-08-08T12:24:51.000Z","updated_at":"2024-05-20T10:21:30.000Z","dependencies_parsed_at":null,"dependency_job_id":"8cf30a60-c07e-4b64-848e-9c0c9066cc07","html_url":"https://github.com/pusher/git-store","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"purl":"pkg:github/pusher/git-store","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pusher%2Fgit-store","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pusher%2Fgit-store/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pusher%2Fgit-store/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pusher%2Fgit-store/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pusher","download_url":"https://codeload.github.com/pusher/git-store/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pusher%2Fgit-store/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264958135,"owners_count":23689007,"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":["cloud-infrastructure"],"created_at":"2024-08-04T18:00:21.525Z","updated_at":"2025-12-30T06:26:08.141Z","avatar_url":"https://github.com/pusher.png","language":"Go","readme":"# Git Store\nGit abstraction layer written in Go, mainly for use in Kubernetes Controllers.\n\nGit Store is based on [Go Git](https://github.com/src-d/go-git) and provides convenience methods\nfor cloning, fetching and checking out repository references and accessing file contents within a repository.\n\n## Usage\n\nTo get a slice of all yaml and json file from a repository at a given reference:\n\n```\nfunc getFilesFromRepo(url string, privateKey []byte, gitReference string) ([]*gitstore.File, error) {\n\tstore := gitstore.NewRepoStore()\n\n\trepo, err := store.Get(\u0026gistore.RepoRef{\n\t\tURL: \t\turl,\n\t\tPrivateKey:\tprivateKey,\n\t})\n\n\terr = repo.Checkout(gitReference)\n\n\tglobbedSubPath := strings.TrimPrefix(gt.Spec.SubPath, \"/\") + \"{**/*,*}.{yaml,yml,json}\"\n\tfiles, err := repo.GetAllFiles(globbedSubPath, true)\n\treturn files, err\n}\n```\n\nThen, to work with these files:\n```\nfiles, err := getFilesFromRepo(\"git@github.com:/...\", someKey, \"master\")\n\nfor file := range files {\n\tdoStuffWith(file.Contents())\n}\n```\n\n## Communication\n\n* Found a bug? Please open an issue.\n* Have a feature request. Please open an issue.\n* If you want to contribute, please submit a pull request\n\n## Contributing\nPlease see our [Contributing](CONTRIBUTING.md) guidelines.\n\n## License\nThis project is licensed under Apache 2.0 and a copy of the license is available [here](LICENSE).\n","funding_links":[],"categories":["Operators vs Controllers"],"sub_categories":["Development Tools"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpusher%2Fgit-store","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpusher%2Fgit-store","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpusher%2Fgit-store/lists"}