Commits

Stefan Saasen committed eaadd5d

Detect push via HTTP even if there is no 'push' label

Comments (0)

Files changed (1)

logparser/src/Stash/Log/GitOpsAnalyser.hs

 isShallowClone logLine = inLabel logLine "shallow clone"
 
 isPush :: LogLine -> Bool
-isPush logLine = inLabel logLine "push"
+isPush logLine = inLabel logLine "push" || isHttpPush
+    where isHttpPush = let action      = getAction logLine
+                           path        = getPath action
+                           method      = getMethod action
+                       in ".git/git-upload-pack" `S.isSuffixOf` path && "POST" == method
 
 isRefs :: LogLine -> Bool
 isRefs logLine = inLabel logLine "refs"