{"id":15048286,"url":"https://github.com/github/captain-hook","last_synced_at":"2025-10-04T08:31:25.475Z","repository":{"id":65974828,"uuid":"140465971","full_name":"github/captain-hook","owner":"github","description":"slack bot that provides subscription service for npm webhooks","archived":true,"fork":true,"pushed_at":"2016-07-05T22:22:50.000Z","size":358,"stargazers_count":7,"open_issues_count":0,"forks_count":6,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-09-25T21:09:56.117Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"npm/captain-hook","license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/github.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":"2018-07-10T17:24:12.000Z","updated_at":"2024-07-31T03:20:35.000Z","dependencies_parsed_at":"2023-02-19T18:01:00.331Z","dependency_job_id":null,"html_url":"https://github.com/github/captain-hook","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/github%2Fcaptain-hook","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/github%2Fcaptain-hook/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/github%2Fcaptain-hook/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/github%2Fcaptain-hook/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/github","download_url":"https://codeload.github.com/github/captain-hook/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":219876581,"owners_count":16554769,"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":[],"created_at":"2024-09-24T21:10:18.023Z","updated_at":"2025-10-04T08:31:20.204Z","avatar_url":"https://github.com/github.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# captain-hook\n\u003e a slack bot to subscribe to npm webhook notifications\n\n![captain hook](assets/haggis-pirate.png)\n\n## usage\n\n```\n/captain-hook subscribe \u003ctype: package||organization\u003e \u003cname\u003e \u003csharedsecret\u003e\n```\n\n## local dev\n\n`captain-hook` is a NodeJS application. if you don't have [NodeJS]\nyou'll need to [download it].\n\n`captain-hook` uses a Postgres database.\n\n### up and running\n\n1. Fork and clone this repo\n2. `cd captain-hook`\n3. `npm install`\n4. Copy `.envsample` to `.env` and fill it out\n\n  | variable                   | description                                                                                                                                                                 |\n  |------------------ |---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n  | SLACK_API_TOKEN   | Bot API token. You can find this on the Slack Developers site by navigating: Browse Apps \u003e Custom Integrations \u003e Bots Configurations on {{team_name}} \u003e Edit configuration  |\n  | SLACK_CHANNEL_ID  | Name of the channel, i.e. #testing. Can also be ID number retrieved from the Slack API.                                                                                     |\n  | SHARED_SECRET     | Any string.                                                                                                                                                                 |\n  | DATABASE_URL      | URL of your Postgres database. defaults to `localhost:5432/dev` |\n\n5. `npm db:setup`, creates a Postgres db, then runs [Knex] migrations and seeds\n6. `npm run dev`, runs `npm start` and pipes output to nice logging\n  You now have a service running on [`localhost:6666`]. You'll probably want to expose\n  that to the internet for local development. [`ngrok`] is a great, free option.\n\n## web interface\n\nthe `captain hook` web interface is an express app. it servers basic CRUD functionality for the two resources: `users` and `subscriptions`.\n\nto start it, run `npm run start:web` and then visit [`http://localhost:8080`].\n\n[NodeJS]: https://nodejs.org\n[download it]: https://nodejs.org\n[`localhost:6666`]: http://localhost:6666\n[`ngrok`]: https://ngrok.com/\n[Knex]: http://knexjs.org/\n[`http://localhost:8080`]: http://localhost:8080\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgithub%2Fcaptain-hook","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgithub%2Fcaptain-hook","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgithub%2Fcaptain-hook/lists"}