From ba1c7407eaa0c09e93d8f319c9e7e65bdf0187d3 Mon Sep 17 00:00:00 2001 From: Aleksandr Nogikh Date: Tue, 17 Jan 2023 19:20:37 +0100 Subject: pkg/subsystem/linux: extract names for subsystems Extract the short subsystem name from the mailing list email. Stip the common prefixes and suffixes and make sure there are no duplicates. As a fallback, assign the whole list email address as a subsystem name. --- pkg/subsystem/linux/subsystems_test.go | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'pkg/subsystem/linux/subsystems_test.go') diff --git a/pkg/subsystem/linux/subsystems_test.go b/pkg/subsystem/linux/subsystems_test.go index f5699f26e..caf675244 100644 --- a/pkg/subsystem/linux/subsystems_test.go +++ b/pkg/subsystem/linux/subsystems_test.go @@ -25,17 +25,21 @@ func TestGroupLinuxSubsystems(t *testing.T) { } expected := []*entity.Subsystem{ { + Name: "fs", Lists: []string{"linux-fsdevel@vger.kernel.org"}, Maintainers: []string{"email_vfs@email.com"}, }, { + Name: "ext4", Lists: []string{"linux-ext4@vger.kernel.org"}, Maintainers: []string{"email_ext4@email.com", "email_ext4_2@email.com"}, }, { + Name: "mm", Lists: []string{"linux-mm@kvack.org"}, }, { + Name: "kernel", Lists: []string{"linux-kernel@vger.kernel.org"}, Maintainers: []string{"email_rest@email.com"}, }, -- cgit mrf-deployment