Plugin Development

Assuming everything is working, you probably want to hack on “policies”. They are the things that do the stuff you want done. They are kind of like plugins. Users specify the policy they want to operate in their repo (using .gnome.yml), and you write the policy in python code that does what they want. Whenever the service get’s a callback from GitHub, it “dispatches” all the configured policies. Simple.

Policy

class policies.Policy(config, callback)[source]

Abstract base-class. Inherited by policies that actually do stuff.

Don’t put this in your .gnome.yml, it’s ignored.

dispatch_gnome()[source]

The method that does the stuff you want done.

This method must be over-ridden in actual policies.

SortingHat

class policies.SortingHat(config, callback)[source]

The “Sorting Hat” is a milestone with no due-date, that signifies some sort of ticket grooming/prioritisation process is necessary.

The sorting hat is like an in-tray for the person/people responsible for assessing and prioritising tickets.

As a software developer
I want my auto-gnome to use a sorting hat policy
So that my tickets are continuously groomed and prioritised
dispatch_gnome()[source]

The method that does the stuff you want done.

This method must be over-ridden in actual policies.

VerboseCallbackLogging

class policies.VerboseCallbackLogging(config, callback)[source]

This policy is very simple, it is primarially used for debugging the ticket gnome itself.

As a Gnome user, enabling this policy will achieve nothing because you don’t have access to the logs it creates.

As a Gnome operator, you may find it useful for debugging but probably not.

As a Gnome developer, it serves as a canonical example of how to create a policy to be enacted by the Gnome. That is why there is so much more documentation than code.

dispatch_gnome()[source]

You can consider the “dispatch_gnome” method like “main” method for gnomes. It is the only method every subclass of Policy requires, and is the method invoked in response to callback event from GitHub (if the repo is configured with this policy active).