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

shuyangw pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/apisix.git


The following commit(s) were added to refs/heads/master by this push:
     new 6252c58  ci: guide contributor to fix the category (#4748)
6252c58 is described below

commit 6252c58a33cbb69a5863c1512541444c8a8ea8a0
Author: 罗泽轩 <[email protected]>
AuthorDate: Wed Aug 4 06:57:07 2021 +0800

    ci: guide contributor to fix the category (#4748)
    
    Signed-off-by: spacewander <[email protected]>
---
 utils/check-category.py | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/utils/check-category.py b/utils/check-category.py
index 79c2c75..b81d81e 100755
--- a/utils/check-category.py
+++ b/utils/check-category.py
@@ -41,7 +41,8 @@ def collect_fn(entries, topic):
                 collect_fn(entries, item)
 
 def check_category(root):
-    with open(root + "config.json") as f:
+    index = root + "config.json"
+    with open(index) as f:
         entries = []
 
         data = json.load(f)
@@ -50,18 +51,19 @@ def check_category(root):
         for e in entries:
             fn = root + e + EXT
             if not path.exists(fn):
-                print("Entry %s in the sidebar can't be found" % fn)
+                print("Entry %s in the sidebar can't be found. Please remove 
it from %s."
+                        % (fn, index))
                 return False
 
-        deny_list = ["examples/plugins-hmac-auth-generate-signature", 
"config", "README"]
-        entries.extend(deny_list)
+        ignore_list = ["examples/plugins-hmac-auth-generate-signature", 
"config", "README"]
+        entries.extend(ignore_list)
         existed_files = []
         for parent, dirs, files in os.walk(root):
             for fn in files:
                 existed_files.append(path.join(parent[len(root):], 
path.splitext(fn)[0]))
         for fn in existed_files:
             if fn not in entries:
-                print("File %s%s%s is not indexed" % (root, fn, EXT))
+                print("File %s%s%s is not indexed. Please add it to %s." % 
(root, fn, EXT, index))
                 return False
         return True
 

Reply via email to