From dc92ccda0a46f78315fe2936728a7062266aa59c Mon Sep 17 00:00:00 2001 From: Imran Remtulla Date: Sat, 16 Dec 2023 02:01:43 -0500 Subject: [PATCH] Use public GitLab search API (#1147) --- lib/app_sources/gitlab.dart | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/lib/app_sources/gitlab.dart b/lib/app_sources/gitlab.dart index 265b299..ae191f1 100644 --- a/lib/app_sources/gitlab.dart +++ b/lib/app_sources/gitlab.dart @@ -48,12 +48,6 @@ class GitLab extends AppSource { label: tr('fallbackToOlderReleases'), defaultValue: true) ] ]; - searchQuerySettingFormItems = [ - GeneratedFormTextField('PAT', - label: tr('gitlabPATLabel').split('(')[0], - password: true, - required: false) - ]; } @override @@ -86,18 +80,8 @@ class GitLab extends AppSource { @override Future>> search(String query, {Map querySettings = const {}}) async { - String? PAT; - if (!hostChanged) { - PAT = await getPATIfAny({}); - if (PAT == null) { - throw CredsNeededError(name); - } - } - if ((querySettings['PAT'] as String?)?.isNotEmpty == true) { - PAT = querySettings['PAT']; - } var url = - 'https://$host/api/v4/search?${PAT?.isNotEmpty == true ? 'private_token=$PAT&' : ''}scope=projects&search=${Uri.encodeQueryComponent(query)}'; + 'https://$host/api/v4/projects?search=${Uri.encodeQueryComponent(query)}'; var res = await sourceRequest(url); if (res.statusCode != 200) { throw getObtainiumHttpError(res);