From e7d57e04060fe20b2bc014115a3cd56a18ce18f1 Mon Sep 17 00:00:00 2001 From: caoyanyi Date: Fri, 24 May 2024 13:59:44 +0800 Subject: [PATCH] * Adjust scm log parse. --- lib/scm/gitea.class.php | 2 +- lib/scm/gogs.class.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/scm/gitea.class.php b/lib/scm/gitea.class.php index 0382f1fc16..91970f5fe7 100644 --- a/lib/scm/gitea.class.php +++ b/lib/scm/gitea.class.php @@ -719,7 +719,7 @@ class giteaRepo list($action, $entry) = $lineList; $entry = '/' . trim($entry); $pathInfo = array(); - $pathInfo['action'] = $action; + $pathInfo['action'] = substr($action, 0, 1); $pathInfo['kind'] = 'file'; $pathInfo['oldPath'] = isset($lineList[2]) ? '/' . trim($lineList[2]) : ''; $changes[$entry] = $pathInfo; diff --git a/lib/scm/gogs.class.php b/lib/scm/gogs.class.php index 2951e9ff87..7daa11739e 100644 --- a/lib/scm/gogs.class.php +++ b/lib/scm/gogs.class.php @@ -737,7 +737,7 @@ class gogsRepo list($action, $entry) = $lineList; $entry = '/' . trim($entry); $pathInfo = array(); - $pathInfo['action'] = $action; + $pathInfo['action'] = substr($action, 0, 1); $pathInfo['kind'] = 'file'; $pathInfo['oldPath'] = isset($lineList[2]) ? '/' . trim($lineList[2]) : ''; $changes[$entry] = $pathInfo;