[llvm] [GitHub] Fix `mlir:core` label definition (PR #66556)

Markus Böck via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 15 15:36:09 PDT 2023


https://github.com/zero9178 created https://github.com/llvm/llvm-project/pull/66556

The current regex for the `mlir:core` PR label is too accepting. It uses `**` as a prefix for all paths, which allows any kind of directory prefix to be inserted when matching. Combined with directory suffices such as `IR` and `Transforms`, it leads to many false positives of being applied to PRs that do not touch MLIR core such as https://github.com/llvm/llvm-project/pull/66520

This PR therefore changes the `mlir:core` labels to only include the specified top-level directories if directly nested under either `lib` for source files, or `include` for header files

>From c34f3f0dd76cceb4952f9a9caa75f78b7d407f16 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Markus=20B=C3=B6ck?= <markus.boeck02 at gmail.com>
Date: Sat, 16 Sep 2023 00:35:34 +0200
Subject: [PATCH] [GitHub] Fix `mlir:core` label definition

The current regex for the `mlir:core` PR label is too accepting. It uses `**` as a prefix for all paths, which allows any kind of directory prefix to be inserted when matching.
Combined with directory suffices such as `IR` and `Transforms`, it leads to many false positives of being applied to PRs that do not touch MLIR core such as https://github.com/llvm/llvm-project/pull/66520

This PR therefore changes the `mlir:core` labels to only include the specified top-level directories if directly nested under either `lib` for source files, or `include` for header files
---
 .github/new-prs-labeler.yml | 30 ++++++++++++++++++++----------
 1 file changed, 20 insertions(+), 10 deletions(-)

diff --git a/.github/new-prs-labeler.yml b/.github/new-prs-labeler.yml
index dfc6148eda82511..63868313ac980f0 100644
--- a/.github/new-prs-labeler.yml
+++ b/.github/new-prs-labeler.yml
@@ -110,16 +110,26 @@ mlir:
   - mlir/**
 
 mlir:core:
-  - mlir/**/Support/**
-  - mlir/**/Parser/**
-  - mlir/**/IR/**
-  - mlir/**/Bytecode/**
-  - mlir/**/AsmParser/**
-  - mlir/**/Pass/**
-  - mlir/**/tools/**
-  - mlir/**/Reducer/**
-  - mlir/**/Transforms/**
-  - mlir/**/Debug/**
+  - mlir/include/mlir/Support/**
+  - mlir/lib/Support/**
+  - mlir/include/mlir/Parser/**
+  - mlir/lib/Parser/**
+  - mlir/include/mlir/IR/**
+  - mlir/lib/IR/**
+  - mlir/include/mlir/Bytecode/**
+  - mlir/lib/Bytecode/**
+  - mlir/include/mlir/AsmParser/**
+  - mlir/lib/AsmParser/**
+  - mlir/include/mlir/Pass/**
+  - mlir/lib/Pass/**
+  - mlir/include/mlir/Tools/**
+  - mlir/lib/Tools/**
+  - mlir/include/mlir/Reducer/**
+  - mlir/lib/Reducer/**
+  - mlir/include/mlir/Transforms/**
+  - mlir/lib/Transforms/**
+  - mlir/include/mlir/Debug/**
+  - mlir/lib/Debug/**
   - mlir/tools/**
 
 mlir:ods:



More information about the llvm-commits mailing list