This is an automated email from the ASF dual-hosted git repository.

critas pushed a commit to branch wx_0214_checktodo
in repository https://gitbox.apache.org/repos/asf/iotdb.git

commit 8e988abb60ecbf9fd12914415d72f2bc394b8e26
Author: CritasWang <[email protected]>
AuthorDate: Fri Feb 14 16:51:39 2025 +0800

    fix todos-check
---
 .github/workflows/todos-check.yml | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/.github/workflows/todos-check.yml 
b/.github/workflows/todos-check.yml
index e8ff7c8a2b1..a891e557495 100644
--- a/.github/workflows/todos-check.yml
+++ b/.github/workflows/todos-check.yml
@@ -4,6 +4,7 @@ on:
   pull_request:
     branches:
       - master
+      - 'dev/*'
       - 'rel/*'
       - "rc/*"
       - 'force_ci/**'
@@ -29,13 +30,15 @@ jobs:
           git switch -c check_branch
           
           # Get the diff of the changes
-          DIFF=$(git diff origin/$GITHUB_BASE_REF check_branch)
+          DIFF=$(git diff origin/$GITHUB_BASE_REF check_branch  -- . 
':(exclude).github/workflows/todos-check.yml')
           
   
           # Check the diff for TODOs
-          if echo "$DIFF" | grep -Eq '^\+.*(TODO|FIXME)'; then
-            echo "TODO or FIXME found in the changes. Please resolve it before 
merging."
-            # exit 1
+          echo "$DIFF" | grep -E '^\+.*(TODO|FIXME)' > check.log
+          if [ $(wc -l < check.log> -eq 0)]; then
+            echo "No TODOs or FIXMEs found in changed content."
           else
-            echo "No TODOs found in changed content."
+            echo "TODO or FIXME found in the changes. Please resolve it before 
merging."
+            cat check.log
+            exit 1
           fi

Reply via email to