{"id":21409825,"url":"https://github.com/stackbuilders/octohat","last_synced_at":"2025-08-26T23:38:53.337Z","repository":{"id":26954125,"uuid":"30417104","full_name":"stackbuilders/octohat","owner":"stackbuilders","description":"API wrapper for Github's API in Haskell with tests","archived":false,"fork":false,"pushed_at":"2015-09-30T04:47:55.000Z","size":552,"stargazers_count":17,"open_issues_count":6,"forks_count":5,"subscribers_count":29,"default_branch":"master","last_synced_at":"2025-08-20T04:05:23.115Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Haskell","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/stackbuilders.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":"2015-02-06T14:54:37.000Z","updated_at":"2020-07-17T16:28:56.000Z","dependencies_parsed_at":"2022-08-20T22:30:28.334Z","dependency_job_id":null,"html_url":"https://github.com/stackbuilders/octohat","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/stackbuilders/octohat","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stackbuilders%2Foctohat","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stackbuilders%2Foctohat/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stackbuilders%2Foctohat/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stackbuilders%2Foctohat/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stackbuilders","download_url":"https://codeload.github.com/stackbuilders/octohat/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stackbuilders%2Foctohat/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272267870,"owners_count":24903791,"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","status":"online","status_checked_at":"2025-08-26T02:00:07.904Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2024-11-22T17:34:31.087Z","updated_at":"2025-08-26T23:38:53.305Z","avatar_url":"https://github.com/stackbuilders.png","language":"Haskell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Octohat\n[![Build Status](https://travis-ci.org/stackbuilders/octohat.svg?branch=master)](https://travis-ci.org/stackbuilders/octohat)\n[![Hackage](https://img.shields.io/hackage/v/octohat.svg)](http://hackage.haskell.org/package/octohat)\n\nA well tested, GitHub API client for Haskell using `wreq` as a backend.\n\nThe project uses Stackage to maintain build stability.\n\n## Currently supported endpoints\n\n### Members\n\n`module Network.Octohat.Members`\n\n* Add teams to an organization\n  `addTeamToOrganization`\n\n* Delete teams from an organization\n  `deleteTeamFromOrganization`\n\n* List all members from an organization\n  `membersForOrganization`\n\n* List all members from a team, using the team id\n  `membersForTeam`\n\n* List all teams from an organization\n  `teamsForOrganization`\n\n* Add members to a team\n  `addMemberToTeam`\n\n* Delete members from a team\n  `deleteMemberFromTeam`\n\n* List Public Keys for a user\n  `publicKeysForUser`\n\n## Instructions\n\n### To install:\n```\ncabal sandbox init\ncabal install --only-dep --enable-test -jN\n```\n\nwhere N = \\\u003cthe number of cores in your machine\\\u003e\n\n### To build:\n\n```\ncabal build\n```\n\n### Then run the test suite:\n\n**CAUTION: Use tokens of a test user, not your own account since the test suite clears state on Github before it runs (i.e., it will delete everything in your github account).**\n\nYou need to set some environment variables.\n\nSet `SANDBOX_ORGANIZATION` to an organization you don't care about, since the tests will delete all the teams within that organization\n\nSet `TEST_ACCOUNT_ONE` to a test account member of the Owners teams in `$SANDBOX_ORGANIZATION`\n\nSet `TEST_ACCOUNT_TWO` to another test account member of the Owners teams in `$SANDBOX_ORGANIZATION`\n\nSet `TEST_ACCOUNT_THREE` to yet another test account member of the Owners teams in `$SANDBOX_ORGANIZATION`\n\nSet `GITHUB_TOKEN` to an API token from `$TEST_ACCOUNT_ONE`. The token scopes should include full admin privileges and the ability to write public keys.\n\nYou can these variables either directly or put them in `.GITHUB_SANDBOX`. Either way they must be set to run the tests. Finally run the tests with:\n\n```\ncabal test\n```\n\n### Demo\n\nAfter you have built the binaries using `cabal build` you should have an executable file named `.dist/build/abc/abc`. This provides a rather basic interface to the GitHub API. The tool expects the environment variable `GITHUB_TOKEN` to be set to a GitHub token with permissions to modify an organization. Some of the operations supported: (each subcommand has its own `--help` page)\n\n`dist/build/abc/abc --help`\n\n```\nSome options\n\nUsage: abc COMMAND\n  GitHub client to manage teams. Please specify your token as GITHUB_TOKEN\n\nAvailable options:\n  -h,--help                Show this help text\n\nAvailable commands:\n  list-teams               List teams in a organization\n  members-in               List members in team and organization\n  add-to-team              Add users to a team\n  delete-user              Delete a user from a team\n```\n\n## License\n\nMIT, see the LICENSE file.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstackbuilders%2Foctohat","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstackbuilders%2Foctohat","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstackbuilders%2Foctohat/lists"}