Browse Source

.github: scripts/check-commit.sh - added prefix tests for files in the repo

Daniel-Constantin Mierla 2 months ago
parent
commit
6e4041d711
1 changed files with 12 additions and 0 deletions
  1. 12 0
      .github/scripts/check-commit.sh

+ 12 - 0
.github/scripts/check-commit.sh

@@ -47,6 +47,18 @@ check_subject() {
     return
     return
   fi
   fi
 
 
+  # file (e.g., ChangeLog, etc/kamailio.cfg)
+  if [ -f "${prefix}" ] ; then
+    echo "[${commit}] prefix is a file in the repo, OK[${prefix}]"
+    return
+  fi
+
+  # shortcut to src/ file (e.g., src/Makefile.defs)
+  if [ -f "src/${prefix}" ] ; then
+    echo "[${commit}] prefix is a file in the src repo, OK[${prefix}]"
+    return
+  fi
+
   # github configs
   # github configs
   if [[ "${prefix}" =~ ^github$ ]] ; then
   if [[ "${prefix}" =~ ^github$ ]] ; then
     echo "[${commit}] prefix is github config, OK[${prefix}]"
     echo "[${commit}] prefix is github config, OK[${prefix}]"