Extract api a few parts of internal base into internal_helpers
What does this MR do and why?
Extract api a few parts of internal base into internal_helpers
So the new internal api /internal/shellhorse/git_audit_event
can reuse these parts.
Related MR discussion: !123486 (comment 1469997902)
Related issue: #384960
Edited by xfyuan