This is an automated email from the ASF dual-hosted git repository. mintsweet pushed a commit to branch fix-gitlab-remote-scope-id in repository https://gitbox.apache.org/repos/asf/incubator-devlake.git
commit b6ce99051785e379e2598dbb8db85fcd473fb100 Author: mintsweet <[email protected]> AuthorDate: Thu Dec 7 11:37:52 2023 +0800 fix(config-ui): group and scope id are duplicated in gitlab --- .../src/plugins/components/data-scope-remote/search-remote.tsx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/config-ui/src/plugins/components/data-scope-remote/search-remote.tsx b/config-ui/src/plugins/components/data-scope-remote/search-remote.tsx index 399d64182..8101a7245 100644 --- a/config-ui/src/plugins/components/data-scope-remote/search-remote.tsx +++ b/config-ui/src/plugins/components/data-scope-remote/search-remote.tsx @@ -71,7 +71,14 @@ export const SearchRemote = ({ plugin, connectionId, config, disabledScope, sele [selectedScope], ); - const allItems = useMemo(() => uniqBy([...miller.items, ...search.items], 'id'), [miller.items, search.items]); + const allItems = useMemo( + () => + uniqBy( + [...miller.items, ...search.items].filter((it) => it.type === 'scope'), + 'id', + ), + [miller.items, search.items], + ); const getItems = async (groupId: ID | null, currentPageToken?: string) => { let newItems: McsItem<T.ResItem>[] = [];
