From 40f8f12e6a749ebd5c87df5675bf4b7c2118ccef Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Thu, 17 Aug 2017 00:46:35 +0200 Subject: Message: Add a function to get the `text` field as a string Clean up some of the calls to get the `text` field by adding a function that abstracts the call to `Data.Text(unpack)`. --- src/Plugin/GitHubCommit.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/Plugin/GitHubCommit.hs') diff --git a/src/Plugin/GitHubCommit.hs b/src/Plugin/GitHubCommit.hs index ee694b4..187f016 100644 --- a/src/Plugin/GitHubCommit.hs +++ b/src/Plugin/GitHubCommit.hs @@ -36,7 +36,7 @@ gitHubCommitAction message = do \Try `git remote set origin REPO_URL`." respond ((RepoUrlRow r):_) = Right $ r `T.append` "/commits/" `T.append` T.pack ( - (T.unpack $ M.text message) =~ matchRegex gitHubCommit) + M.textStr message =~ matchRegex gitHubCommit) type Id = Int -- cgit v1.2.3