aboutsummaryrefslogtreecommitdiffstats
path: root/src/Plugin/GitHubCommit.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Plugin/GitHubCommit.hs')
-rw-r--r--src/Plugin/GitHubCommit.hs5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/Plugin/GitHubCommit.hs b/src/Plugin/GitHubCommit.hs
index 492fd30..9773690 100644
--- a/src/Plugin/GitHubCommit.hs
+++ b/src/Plugin/GitHubCommit.hs
@@ -17,13 +17,16 @@ gitHubCommit = Plugin
}
gitHubCommitAction :: PluginAction
-gitHubCommitAction message dbConn = do
+gitHubCommitAction message = do
+ dbConn <- open "db/sorbot_development.sqlite3"
rs <- query dbConn "SELECT repo_url \
\ FROM plugin_github_commit_channel_repo_urls \
\ WHERE channel = ? \
\ LIMIT 1"
(Only (M.channel message))
:: IO [RepoUrlRow]
+ close dbConn
+
return $ respond rs
where
respond [] =