{"id":13764162,"url":"https://github.com/lucasgomide/snitch","last_synced_at":"2025-07-16T00:32:38.083Z","repository":{"id":57497011,"uuid":"87474667","full_name":"lucasgomide/snitch","owner":"lucasgomide","description":"Keep updated about all deploys on Tsuru","archived":false,"fork":false,"pushed_at":"2018-07-23T18:16:30.000Z","size":43,"stargazers_count":16,"open_issues_count":5,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-09T14:03:48.938Z","etag":null,"topics":["deploy","go","hooks","notifications","slack","snitch","tsuru","webhook"],"latest_commit_sha":null,"homepage":"","language":"Go","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/lucasgomide.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":"2017-04-06T21:02:05.000Z","updated_at":"2025-01-20T18:09:09.000Z","dependencies_parsed_at":"2022-09-03T23:20:34.749Z","dependency_job_id":null,"html_url":"https://github.com/lucasgomide/snitch","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/lucasgomide/snitch","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucasgomide%2Fsnitch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucasgomide%2Fsnitch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucasgomide%2Fsnitch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucasgomide%2Fsnitch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lucasgomide","download_url":"https://codeload.github.com/lucasgomide/snitch/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucasgomide%2Fsnitch/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265470734,"owners_count":23771467,"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":["deploy","go","hooks","notifications","slack","snitch","tsuru","webhook"],"created_at":"2024-08-03T15:01:17.188Z","updated_at":"2025-07-16T00:32:37.812Z","avatar_url":"https://github.com/lucasgomide.png","language":"Go","funding_links":[],"categories":["Software Packages","软件包","Go Tools","Other Software","Go 工具"],"sub_categories":["Other Software","其他软件库和软件包","其他软件"],"readme":"# Snitch\n[![Documentation](https://godoc.org/github.com/lucasgomide/snitch?status.svg)](http://godoc.org/github.com/lucasgomide/snitch)\n[![Coverage Status](https://coveralls.io/repos/github/lucasgomide/snitch/badge.svg?branch=master)](https://coveralls.io/github/lucasgomide/snitch?branch=master)\n[![Go Report Card](https://goreportcard.com/badge/github.com/lucasgomide/snitch)](https://goreportcard.com/report/github.com/lucasgomide/snitch)\n[![Build Status](https://travis-ci.org/lucasgomide/snitch.svg?branch=master)](https://travis-ci.org/lucasgomide/snitch)\n\nKeep updated about each deploy via [Tsuru](https://docs.tsuru.io/stable/).\n\nThis program will notify your team and many tools when someone has deployed any application via [Tsuru](https://docs.tsuru.io/stable/).\n\n## Quick Start\n\nFirst one, you have to create a hook's configuration file. This file describe wich hook will be dispatched and the your configurations (e.g webhook_url).\n\nYou can add this code into your file, hardcode mode:\n```yaml\nslack:\n  webhook_url: http://your.webhook.here\n```\n\nor using environment variable:\n```yaml\nslack:\n  webhook_url: $SLACK_WEBHOOK_URL\n```\n\nSo now, You must add this code into your file (`tsuru.yaml` or `tsuru.yml`) located in the root of the application [at hook's section](https://docs.tsuru.io/stable/using/tsuru.yaml.html).\n\n```yaml\nhooks:\n  build:\n    - curl -sSL https://github.com/lucasgomide/snitch/releases/download/0.1.0/snitch_0.1.0_linux_amd64.tar.gz | tar xz\n    - ./snitch_linux/snitch -c path/snitch_config.yml\n```\n\n\u003e Put the hook's configuration file path as argument for the *-c* option.\n\n## Options\n\n**-c**\n\nThis option indicates where's the file with the hook's configurations [see more](#hooks-configurations).\n\n**-app-name-contains**\n\nUse it to validate if the snitch should be run. If you tsuru app name does not match it the value of `-app-name-contains`, the program will stop, and no errors will be raised.\n\n## Hook's Configurations\n\nHere is all avaliables hook's configurations and your descriptions. Remember that you may use environment variables to define the options's values.\n\n- Slack\n  - **webhook_url** Indicates the Webhook URL to dispatch messages to Slack.\n\n- Sentry\n  - **host** Tell to Snitch your sentry host (e.g http://sentry.io or http://sentry.self.hosted)\n  - **organization_slug** The organization slug is a unique ID used to identify your organization. (You'll find it at your sentry's configuration, probably)\n  - **project_slug** The Project Slug is a unique ID used to identify your project (You'll find it at your project config)\n  - **auth_token** The token used to authenticate on Sentry API. To generate a new token, you have to access [manager auth tokens](https://sentry.io/api) then create a token. If you are using Sentry self hosted, you need change the domain _sentry.io_ to your own domain, example: _sentry.snitch.com/api_. Find more information [on Sentry documentation](https://docs.sentry.io/api/auth/#auth-tokens)\n  - **env** The application's environment variable (e.g development, production)\n\n- Rollbar\n  - **access_token** The access token with `post_server_item` scope. You can find more [here](https://rollbar.com/docs/api/#authentication)\n  - **env** The application's environment variable (e.g development, production)\n\n- NewRelic\n  - **host** Tell to Snitch your NewRelic API host (e.g https://api.newrelic.com)\n  - **application_id** The application ID is a unique ID used to identify your application in APM. (You'll find it at the end of the application's page URL)\n  - **api_key** The API Key to use the NewRelic REST API. You can find more [here](https://docs.newrelic.com/docs/apis/rest-api-v2/getting-started/api-keys)\n  - **revision** The application's current revision (e.g 0.0.1r42)\n\n- HangoutsChat\n  - **webhook_url** Indicates the Webhook URL to dispatch messages to HangoutsChat Room.\n\n## Example\n\n[Snitch App Sample](https://github.com/lucasgomide/snitch-app-example)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flucasgomide%2Fsnitch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flucasgomide%2Fsnitch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flucasgomide%2Fsnitch/lists"}