aboutsummaryrefslogtreecommitdiffstats
path: root/src/Plugin.hs
diff options
context:
space:
mode:
authorTeddy Wing2017-08-17 04:33:39 +0200
committerTeddy Wing2017-08-17 04:33:39 +0200
commitb4646cc2522f204550d97998d727d12108896ffa (patch)
treec13aa70023776b0af305b98ba617a272667d9d94 /src/Plugin.hs
parent5acf337a778d4806f2a4ed84b04d2d8fc3415949 (diff)
downloadsorbot-b4646cc2522f204550d97998d727d12108896ffa.tar.bz2
Add GitRemoteSetOrigin plugin
This plugin provides a command to set a git commit repo URL for use with the `GitHubCommit` plugin. Typing git remote set origin URL in chat will set that URL to the current channel. Problems: * Can't figure out how to use capture groups, so the entire matched message string comes back, not just the URL * Need to upsert instead of insert into the database
Diffstat (limited to 'src/Plugin.hs')
-rw-r--r--src/Plugin.hs2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/Plugin.hs b/src/Plugin.hs
index 0ff1367..a9918fc 100644
--- a/src/Plugin.hs
+++ b/src/Plugin.hs
@@ -11,6 +11,7 @@ import Text.Regex.TDFA
import qualified Message as M
import Plugin.Base
import Plugin.GitHubCommit
+import Plugin.GitRemoteSetOrigin
-- | Get the first plugin that matches the given message text.
matchPlugin :: M.Message -> Maybe Plugin
@@ -32,4 +33,5 @@ performPlugin p message = perform p $ message
plugins :: [Plugin]
plugins =
[ gitHubCommit
+ , gitRemoteSetOrigin
]