This is a Rails project to receive webhooks from Gitlab MRs and notify people on Slack. After starting the server, visit [localhost:3000] to create a webhook target. Then, in Gitlab, create a webhook to point to the URL provided by the Rails app. The Rails app will then send a message to the Slack channel specified in the webhook target.
Currently, I am using a Tailscale Funnel to route the webhook from Gitlab to my local machine. You can set RAILS_DEVELOPMENT_HOSTS to a comma-separated list of hosts to allow webhooks from other hosts.
This project is built with Ruby 3.0.1 although it should work with any Ruby 2.7+ version. It uses Rails 7.0.6. To get started developing:
- clone the repo
- run
bundle installto install the dependencies. - run
rails db:setupto create the database and run the migrations - run
rails sto start the server
rails s- start the serverrails c- start the consolerails routes- list the routes