1. Stefan Saasen
  2. stash-log-parser

Commits

Stefan Saasen  committed eaadd5d

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

  • Participants
  • Parent commits 553c974
  • Branches master

Comments (0)

Files changed (1)

File logparser/src/Stash/Log/GitOpsAnalyser.hs

View file
 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"