{"id":24144883,"url":"https://github.com/bitsapien/slackbot-rails","last_synced_at":"2025-09-19T12:32:49.498Z","repository":{"id":56896074,"uuid":"84169645","full_name":"bitsapien/slackbot-rails","owner":"bitsapien","description":"An activerecord hook to send notifications to slack on updations and creation of resources.","archived":false,"fork":false,"pushed_at":"2017-03-10T14:52:48.000Z","size":43,"stargazers_count":2,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-12-13T19:08:29.657Z","etag":null,"topics":["activerecord","notifications","slack","slackbot"],"latest_commit_sha":null,"homepage":null,"language":"Ruby","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/bitsapien.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-03-07T07:40:27.000Z","updated_at":"2022-04-11T12:57:55.000Z","dependencies_parsed_at":"2022-08-21T01:50:09.850Z","dependency_job_id":null,"html_url":"https://github.com/bitsapien/slackbot-rails","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/bitsapien%2Fslackbot-rails","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitsapien%2Fslackbot-rails/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitsapien%2Fslackbot-rails/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitsapien%2Fslackbot-rails/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bitsapien","download_url":"https://codeload.github.com/bitsapien/slackbot-rails/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":233570505,"owners_count":18695866,"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":["activerecord","notifications","slack","slackbot"],"created_at":"2025-01-12T06:13:19.874Z","updated_at":"2025-09-19T12:32:44.211Z","avatar_url":"https://github.com/bitsapien.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Slackbot::Rails\n\nAn activerecord hook to send notifications to slack on updations and creation of resources.\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n    gem 'slackbot-rails', :git =\u003e 'git://github.com/bitsapien/slackbot-rails.git'\n\nAnd then execute:\n\n    $ bundle\n\n## Usage\n\nJust put the `notify_bot` method in your model\n\n```ruby\nclass Model \u003c ActiveRecord::Base\n  notify_bot bot:     {\n               webhook: '\u003cWEBHOOK URL\u003e',\n               name: '\u003cBOT NAME\u003e',\n               channel: '#channel-name'\n             }, \n             message: {\n              create: 'A new resource in *{class.model_name.human}* was created. '}\n\nend\n```\n\nThis would send a notification on Slack:\n\n![Slack Preview](https://raw.githubusercontent.com/bitsapien/slackbot-rails/master/images/slack-preview.png)\n\nAttributes inside '{}' will be evaluated on the present object of the model, for example : \n`It is {valid?} that the present object passed validations` would output -\u003e\n`It is true that the present object passed validations`\n\n\n#### Setting Defaults\n\nYou may enable/disable notifications using a flag, for example in `application.rb`\n\n```ruby\nconfig.slackbot_rails_enable = Rails.env.production?\n```\n\n\n## TODO\n\n1. Specs!\n2. Background job option.\n3. Add I18n support.\n4. Add fallbacks for configurations.\n5. Add more support for emojis.\n\n\n## Contributing\n\n1. Fork it\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 new Pull Request\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbitsapien%2Fslackbot-rails","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbitsapien%2Fslackbot-rails","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbitsapien%2Fslackbot-rails/lists"}