Skip to content

tfinnell/gitnotify

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Gitnotify

Triggers a pop-up notification when a message is received from an AMQP queue.

There's a bit to configure here if you're starting from scratch... but, if you already have an AMQP broker configured to your taste, edit broker.yaml with your credentials and run gitnotify.rb. Once you enable Githubs AMQP service hook you should be getting notifications when someone pushes to your repository.

Will change the functionality of this script so that some of this configuration isn't necessary..

a note

Advanced Message Queuing Protocol

Setup for Arch Linux

  1. Install rabbitmq from the aur with $ packer rabbitmq
  2. You can change NODENAME in /etc/rabbitmq/rabbitmq-env.conf if desired
  3. Install the rabbitmq management interface with # rabbitmq-plugins enable rabbitmq_management
  4. Run the rabbitmq start script
  5. Add a new user or two and get rid of the guest account
  6. Create a new Virtual host eg. github
  7. Create a new Queue using the virutal host you just created eg. github
  8. Create a new Exchange with the queue you just created that is type topic or fanout
  9. Click on the new exchange you just created and add a binding to the queue you created with the routing key github.# if you created.
  10. On Github's site: go to administration settings for your repository -> service hooks, amqp -> fill out the form... click test hook... you should see a new message in your queue...
Notes:

I tried enabling the manager web interface but ran into some problems... When I ran # rabbitmq-plugins enable rabbitmq_management I got:

Error: {cannot_write_enabled_plugins_file,"/etc/rabbitmq/enabled_plugins",
        eaccess}

If I # touch /etc/rabbitmq/enabled_plugins and try to enable the plugin again, I get:

Error: {'EXIT',{{case_clause,{ok,[]}},
 [{rabbit_plugins,read_enabled_plugins,1},
  {rabbit_plugins,action,5},
  {rabbit_plugins,start,0},
  {init,start_it,1},
  {init,start_em,1}]}}

Needed to add []. in the enabled_plugins file and chmod o+r, then was able to restart the server and gain access to the management interface.

About

Uses Githubs AMQP service hook to trigger a notification pop-up

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages