aboutsummaryrefslogtreecommitdiffstats
path: root/src/Plugin/GitHubCommit.hs
AgeCommit message (Collapse)Author
2017-08-02Change `PluginAction` type to `Message -> String`Teddy Wing
Have `PluginAction` functions take a Message type instead of a plain string. This gives us access to additional fields on the message: channel and nick. sorbot.cabal: Add `Message` to `exposed-modules` in order to be able to use it when building. Lib.hs: Change our test message to be a `Message` data type to conform to the new `PluginAction` interface. Plugin.hs: Use `Message` where appropriate. When calling `perform`, pass it a `Message` instead of a `String`. This means we have to match the regex within the plugin in order to get the match data. The benefit of that change is that now we have access to the full message in the plugin if we need it, not just the regex-filtered part. GitHubCommit.hs: Do a regex match against the Message text in order to get the SHA we want from the message.
2017-07-30Move GitHub Commit plugin to its own moduleTeddy Wing
Extract the GitHub commit plugin code from "Plugin.hs" into its own module. Now that we have things more set up and working to a certain degree, we can split the code out.