From 55fed7804d686fed83d9265b7f574f9b5b9d6d3e Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Sun, 30 Jul 2017 02:27:54 +0200 Subject: Restrict Git SHA regex to full SHAs Only match SHAs if they're the full 40 characters long. This will become important later when we have an actual chat bot and we don't want to match on partial SHAs. --- src/Lib.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/Lib.hs b/src/Lib.hs index 3bc9579..ddbd41f 100644 --- a/src/Lib.hs +++ b/src/Lib.hs @@ -11,4 +11,4 @@ someFunc rex :: Bool -rex = "75ac7b18a009ffe7a77a17a61d95c01395f36b44" =~ "^[0-9a-f]{5,40}$" +rex = "75ac7b18a009ffe7a77a17a61d95c01395f36b44" =~ "^[0-9a-f]{40}$" -- cgit v1.2.3