From 14468f3e28dd1f355d881217ac2dd21bb4275116 Mon Sep 17 00:00:00 2001 From: Robert Oskamp Date: Fri, 25 Oct 2024 13:21:41 +0200 Subject: [PATCH 1/3] Code owners check - match files and directories --- packages/kbn-code-owners/src/file_code_owner.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/kbn-code-owners/src/file_code_owner.ts b/packages/kbn-code-owners/src/file_code_owner.ts index 525a2964c7338..1f98d50c4bacc 100644 --- a/packages/kbn-code-owners/src/file_code_owner.ts +++ b/packages/kbn-code-owners/src/file_code_owner.ts @@ -43,11 +43,12 @@ export function getPathsWithOwnersReversed(): PathWithOwners[] { const pathsWithOwners: PathWithOwners[] = codeowners.map((c) => { const [path, ...ghTeams] = c.split(/\s+/); + const cleanedPath = path.replace(/\/$/, ''); // remove trailing slash return { - path, + path: cleanedPath, teams: ghTeams.map((t) => t.replace('@', '')).join(), // register CODEOWNERS entries with the `ignores` lib for later path matching - ignorePattern: ignore().add([path]), + ignorePattern: ignore().add([cleanedPath]), }; }); From da7ebfe7dfb85e3fa056b7d8716b655833c95230 Mon Sep 17 00:00:00 2001 From: Tre' Seymour Date: Tue, 29 Oct 2024 10:00:04 +0000 Subject: [PATCH 2/3] [WIP] Just a test --- .../plugins/management_test_plugin/public/index.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/test/plugin_functional/plugins/management_test_plugin/public/index.ts b/test/plugin_functional/plugins/management_test_plugin/public/index.ts index e98dc4bf92956..1a7eb2b7da2dc 100644 --- a/test/plugin_functional/plugins/management_test_plugin/public/index.ts +++ b/test/plugin_functional/plugins/management_test_plugin/public/index.ts @@ -14,5 +14,9 @@ import { ManagementTestPluginStart, } from './plugin'; -export const plugin: PluginInitializer = () => - new ManagementTestPlugin(); +// export const plugin: PluginInitializer = () => + // new ManagementTestPlugin(); + +export const plugin: PluginInitializer = function() { + return new ManagementTestPlugin(); +} From 8c9105d4b6984b79c5f0523a748f67b2f81b964b Mon Sep 17 00:00:00 2001 From: kibanamachine <42973632+kibanamachine@users.noreply.github.com> Date: Tue, 29 Oct 2024 10:24:17 +0000 Subject: [PATCH 3/3] [CI] Auto-commit changed files from 'node scripts/eslint --no-cache --fix' --- .../plugins/management_test_plugin/public/index.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/test/plugin_functional/plugins/management_test_plugin/public/index.ts b/test/plugin_functional/plugins/management_test_plugin/public/index.ts index 1a7eb2b7da2dc..233e91ed01e9b 100644 --- a/test/plugin_functional/plugins/management_test_plugin/public/index.ts +++ b/test/plugin_functional/plugins/management_test_plugin/public/index.ts @@ -15,8 +15,9 @@ import { } from './plugin'; // export const plugin: PluginInitializer = () => - // new ManagementTestPlugin(); +// new ManagementTestPlugin(); -export const plugin: PluginInitializer = function() { - return new ManagementTestPlugin(); -} +export const plugin: PluginInitializer = + function () { + return new ManagementTestPlugin(); + };