فهرست منبع

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

Daniel-Constantin Mierla 2 ماه پیش
والد
کامیت
6e4041d711
1فایلهای تغییر یافته به همراه12 افزوده شده و 0 حذف شده
  1. 12 0
      .github/scripts/check-commit.sh

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

@@ -47,6 +47,18 @@ check_subject() {
     return
   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
   if [[ "${prefix}" =~ ^github$ ]] ; then
     echo "[${commit}] prefix is github config, OK[${prefix}]"