Hosting Code on GitHub

GitHub makes a great place to host code. There are a few things to remember:

  1. Always use the "raw" URL when registering the ruleset
  2. You have to flush the cache on the rules engine when you update. 
The second can be automated by using a GitHub service hook as shown below.

Flushing

This section is out of date.


When your ruleset changes, you need to tell the engine that there is a new version available. This is easily done with GitHub's webhooks support.

After creating your repository in GitHub and creating your KRL ruleset, go to the repository settings. The button for this is in the repository's menu, near Graphs, Issues, Code, etc.

Once there, go to Service Hooks on the left menu. Click WebHook URLs and you'll presented with a screen that looks like the following:


In the URL field, enter the following URL with your ruleset ID inserted:

    http://cs.kobj.net/ruleset/flush/RULESETIDHERE.prod

Save the WebHook, and you're good to go. When you push your code to GitHub, the pico engine's cache will be flushed.

Copyright Picolabs | Licensed under Creative Commons.