ソースを参照

Merge branch 'ci/optional_approve_list' into 'master'

ci: make ignore lists optional for approval

See merge request espressif/esp-idf!15336
Fu Hanxi 4 年 前
コミット
08dc008d8c
3 ファイル変更14 行追加15 行削除
  1. 8 0
      .gitlab/CODEOWNERS
  2. 6 14
      tools/ci/check_codeowners.py
  3. 0 1
      tools/ci/check_copyright_ignore.txt

+ 8 - 0
.gitlab/CODEOWNERS

@@ -200,3 +200,11 @@
 /tools/unit-test-app/         @esp-idf-codeowners/system @esp-idf-codeowners/tools
 
 requirements.txt              @esp-idf-codeowners/tools
+
+# sort-order-reset
+
+^[Ignore Lists]
+/tools/ci/check_copyright_ignore.txt                    @esp-idf-codeowners/ci @esp-idf-codeowners/tools
+/tools/ci/check_examples_cmake_make-cmake_ignore.txt    @esp-idf-codeowners/ci @esp-idf-codeowners/tools
+/tools/ci/check_examples_cmake_make-make_ignore.txt     @esp-idf-codeowners/ci @esp-idf-codeowners/tools
+/tools/ci/mypy_ignore_list.txt                          @esp-idf-codeowners/ci @esp-idf-codeowners/tools

+ 6 - 14
tools/ci/check_codeowners.py

@@ -2,19 +2,8 @@
 #
 # Utility script for ESP-IDF developers to work with the CODEOWNERS file.
 #
-# Copyright 2020 Espressif Systems (Shanghai) PTE LTD
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# SPDX-FileCopyrightText: 2020-2021 Espressif Systems (Shanghai) CO LTD
+# SPDX-License-Identifier: Apache-2.0
 
 import argparse
 import os
@@ -132,7 +121,10 @@ def action_ci_check(args):
             if line.startswith('# sort-order-reset'):
                 prev_path_pattern = ''
 
-            if not line or line.startswith('#'):
+            if (not line
+                    or line.startswith('#')  # comment
+                    or line.startswith('[')  # file group
+                    or line.startswith('^[')):  # optional file group
                 continue
 
             # Each line has a form of "<path> <owners>+"

+ 0 - 1
tools/ci/check_copyright_ignore.txt

@@ -3967,7 +3967,6 @@ tools/check_term.py
 tools/ci/check_artifacts_expire_time.py
 tools/ci/check_build_warnings.py
 tools/ci/check_callgraph.py
-tools/ci/check_codeowners.py
 tools/ci/check_deprecated_kconfigs.py
 tools/ci/check_examples_cmake_make.py
 tools/ci/check_executables.py