From 74d7d19230f057b56c26ca0c3c8cb60ac4e55a4e Mon Sep 17 00:00:00 2001 From: Konrad Jamrozik Date: Thu, 16 Feb 2023 13:46:46 -0800 Subject: [PATCH] Always use regex matcher when determining contacts for build failure notifications --- .../notification-creator/Contacts.cs | 29 +------------------ 1 file changed, 1 insertion(+), 28 deletions(-) diff --git a/tools/notification-configuration/notification-creator/Contacts.cs b/tools/notification-configuration/notification-creator/Contacts.cs index 9bd064e3bb4..3f49e89f59c 100644 --- a/tools/notification-configuration/notification-creator/Contacts.cs +++ b/tools/notification-configuration/notification-creator/Contacts.cs @@ -120,37 +120,10 @@ private CodeownersEntry GetMatchingCodeownersEntry( CodeownersEntry matchingCodeownersEntry = CodeownersFile.GetMatchingCodeownersEntry( process.YamlFilename, - codeownersEntries, - UseRegexMatcher(repoUrl)); + codeownersEntries); matchingCodeownersEntry.ExcludeNonUserAliases(); return matchingCodeownersEntry; } - - /// - /// Whether the new regex-based CODEOWNERS matcher that supports wildcards should be used - /// for given repository. This method exists to allow incremental roll-out - /// of the new matcher [1]. - /// - /// Note that enabling the new matcher will not change the reviewers assigned to - /// PRs, because this is handled by built-in GitHub matcher. - /// But it will change who receives build failure notifications. - /// - /// [1] https://github.com/Azure/azure-sdk-tools/pull/5088 - /// - private bool UseRegexMatcher(string repoUrl) - { - // Expected repoUrl: https://github.com/Azure/azure-sdk-for-net - if (repoUrl.Contains("azure-sdk-for-net")) - { - // Work that was done to facilitate enabling the matcher in this repo: - // https://github.com/Azure/azure-sdk-for-net/pull/33584 - Fix invalid paths in CODEOWNERS - // https://github.com/Azure/azure-sdk-for-net/pull/33595 - Remove CODEOWNERS rules /**/ci.yml and /**/tests.yml - // https://github.com/Azure/azure-sdk-for-net/pull/33597 - Add missing /sdk/ rules - return true; - } - - return false; - } }