{"id":15713726,"url":"https://github.com/henrikac/github-repos","last_synced_at":"2025-08-11T00:40:23.186Z","repository":{"id":140270665,"uuid":"380841796","full_name":"henrikac/github-repos","owner":"henrikac","description":"A shard that makes it easy to fetch data about specific repositories.","archived":false,"fork":false,"pushed_at":"2021-06-27T21:46:15.000Z","size":5,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-05T21:27:12.389Z","etag":null,"topics":["crystal","crystal-lang","crystal-language"],"latest_commit_sha":null,"homepage":"","language":"Crystal","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/henrikac.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-06-27T21:33:40.000Z","updated_at":"2021-06-28T22:48:08.000Z","dependencies_parsed_at":null,"dependency_job_id":"a938c651-038f-4c14-a2c6-750913fd168e","html_url":"https://github.com/henrikac/github-repos","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/henrikac%2Fgithub-repos","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/henrikac%2Fgithub-repos/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/henrikac%2Fgithub-repos/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/henrikac%2Fgithub-repos/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/henrikac","download_url":"https://codeload.github.com/henrikac/github-repos/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246365640,"owners_count":20765546,"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":["crystal","crystal-lang","crystal-language"],"created_at":"2024-10-03T21:33:07.017Z","updated_at":"2025-03-30T18:47:41.943Z","avatar_url":"https://github.com/henrikac.png","language":"Crystal","funding_links":[],"categories":[],"sub_categories":[],"readme":"# github-repos\n\nA shard that makes it easy to fetch data about specific repositories.  \n\nThis module was original made as part of a personal project which is why only a few properties has been added to `GitHub::Repo`, however, contributions are very welcome ;).\n\n## Installation\n\n1. Add the dependency to your `shard.yml`:\n\n   ```yaml\n   dependencies:\n     github-repos:\n       github: henrikac/github-repos\n   ```\n\n2. Run `shards install`\n\n## Usage\n\nKeep in mind that *\"Unauthenticated clients can make 60 requests per hour\"* [1](https://docs.github.com/en/rest/guides/getting-started-with-the-rest-api#authentication).\n\n```crystal\nrequire \"github-repos\"\n\nrepos = GitHub.fetch_repos(\"henrikac\", [\"pokeapi\", \"github-repos\", \"prettytable\"])\n\nif repos.empty?\n  puts \"Didn't find any repositories :'(\"\nelse\n  repos.each { |r| puts r.title }\nend\n```\n\nThe original purpose of this module was to fetch repository data every 5 minutes. By doing this the data displayed to potential users was always up-to-date.\n\n```crystal\nrequire \"github-repos\"\n\nmut = Mutex.new\nrepos = Array(GitHub::Repo).new\n\nspawn do\n  loop do\n    mut.lock\n    repos = GitHub.fetch_repos(\"henrikac\", [\"pokeapi\", \"github-repos\", \"prettytable\"])\n    mut.unlock\n\n    sleep 5.minutes\n  end\nend\n\n# code ...\n```\n\n## Contributing\n\n1. Fork it (\u003chttps://github.com/henrikac/github-repos/fork\u003e)\n2. Create your feature branch (`git checkout -b my-new-feature`)\n3. Commit your changes (`git commit -am 'Add some feature'`)\n4. Push to the branch (`git push origin my-new-feature`)\n5. Create a new Pull Request\n\n## Contributors\n\n- [Henrik Christensen](https://github.com/henrikac) - creator and maintainer\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhenrikac%2Fgithub-repos","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhenrikac%2Fgithub-repos","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhenrikac%2Fgithub-repos/lists"}