diff --git a/src/ResourceTypes.Base/ResourceTypes.Base.csproj b/src/ResourceTypes.Base/ResourceTypes.Base.csproj index 170508ff69b5571316601a64b4e81063bc751478..6d286040646fc4f57c016809f904fd035b5ca48e 100644 --- a/src/ResourceTypes.Base/ResourceTypes.Base.csproj +++ b/src/ResourceTypes.Base/ResourceTypes.Base.csproj @@ -6,7 +6,7 @@ <Nullable>enable</Nullable> <AssemblyName>Coscine.$(MSBuildProjectName)</AssemblyName> <RootNamespace>Coscine.$(MSBuildProjectName.Replace(" ", "_"))</RootNamespace> - <Version>1.8.1</Version> + <Version>1.8.4</Version> </PropertyGroup> <ItemGroup> diff --git a/src/ResourceTypes.GitLab/GitLabResourceType.cs b/src/ResourceTypes.GitLab/GitLabResourceType.cs index a7ac8da7d995cc76ee537799c274b0fa34a3febc..f9d04fab5086d35ce8c9b3e0c68935424e8385a6 100644 --- a/src/ResourceTypes.GitLab/GitLabResourceType.cs +++ b/src/ResourceTypes.GitLab/GitLabResourceType.cs @@ -176,17 +176,18 @@ public class GitLabResourceType : BaseResourceType { var client = new HttpClient(); - if (string.IsNullOrWhiteSpace(_gitLabResourceTypeConfiguration.RepoUrl) || !Uri.TryCreate(new Uri(_gitLabResourceTypeConfiguration.RepoUrl), Uri.UriSchemeHttps, out Uri? secureHostUrl)) + if (string.IsNullOrWhiteSpace(_gitLabResourceTypeConfiguration.RepoUrl)) { - throw new ArgumentException("RepoUrl must not be null or white space and must be a valid HTTPS URI.", nameof(_gitLabResourceTypeConfiguration.RepoUrl)); + throw new ArgumentException("RepoUrl must not be null or white space.", nameof(_gitLabResourceTypeConfiguration.RepoUrl)); } + // secureHostUrl is a new string with the scheme set to "https" + var secureHostUrl = _gitLabResourceTypeConfiguration.RepoUrl.ToLower().Trim().Replace("http://", "https://").TrimEnd('/'); - // secureHostUrl is a new Uri object with the scheme set to "https" client.DefaultRequestHeaders.Add("PRIVATE-TOKEN", _gitLabResourceTypeConfiguration.AccessToken); var request = new HttpRequestMessage { Method = HttpMethod.Head, - RequestUri = new Uri($"{secureHostUrl}api/v4/projects/{_gitLabResourceTypeConfiguration.ProjectId}/repository/files/{Uri.EscapeDataString(entry.Path)}?ref={_gitLabResourceTypeConfiguration.Branch}"), + RequestUri = new Uri($"{secureHostUrl}/api/v4/projects/{_gitLabResourceTypeConfiguration.ProjectId}/repository/files/{Uri.EscapeDataString(entry.Path)}?ref={_gitLabResourceTypeConfiguration.Branch}"), }; using var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); diff --git a/src/ResourceTypes.GitLab/ResourceTypes.GitLab.csproj b/src/ResourceTypes.GitLab/ResourceTypes.GitLab.csproj index 1b49f16f789df515e381e510f971516f8387caac..5176537b63f6271eeb2a7dcc723ff1da5450c0ae 100644 --- a/src/ResourceTypes.GitLab/ResourceTypes.GitLab.csproj +++ b/src/ResourceTypes.GitLab/ResourceTypes.GitLab.csproj @@ -6,7 +6,7 @@ <Nullable>enable</Nullable> <AssemblyName>Coscine.$(MSBuildProjectName)</AssemblyName> <RootNamespace>Coscine.$(MSBuildProjectName.Replace(" ", "_"))</RootNamespace> - <Version>1.8.1</Version> + <Version>1.8.4</Version> </PropertyGroup> <ItemGroup> diff --git a/src/ResourceTypes.Linked/ResourceTypes.Linked.csproj b/src/ResourceTypes.Linked/ResourceTypes.Linked.csproj index c406850fc1ff9473ac5f646d069b24a2ffb773de..ba7101d4dada59562344772dcaba05a355c7a0d5 100644 --- a/src/ResourceTypes.Linked/ResourceTypes.Linked.csproj +++ b/src/ResourceTypes.Linked/ResourceTypes.Linked.csproj @@ -6,7 +6,7 @@ <Nullable>enable</Nullable> <AssemblyName>Coscine.$(MSBuildProjectName)</AssemblyName> <RootNamespace>Coscine.$(MSBuildProjectName.Replace(" ", "_"))</RootNamespace> - <Version>1.8.1</Version> + <Version>1.8.4</Version> </PropertyGroup> <ItemGroup> diff --git a/src/ResourceTypes.Rds/ResourceTypes.Rds.csproj b/src/ResourceTypes.Rds/ResourceTypes.Rds.csproj index ba1c42cd27dac257f6cbc5e2feca3d3ea002ddbe..0c0632912895906842a783742bd8a9412319d160 100644 --- a/src/ResourceTypes.Rds/ResourceTypes.Rds.csproj +++ b/src/ResourceTypes.Rds/ResourceTypes.Rds.csproj @@ -6,7 +6,7 @@ <Nullable>enable</Nullable> <AssemblyName>Coscine.$(MSBuildProjectName)</AssemblyName> <RootNamespace>Coscine.$(MSBuildProjectName.Replace(" ", "_"))</RootNamespace> - <Version>1.8.1</Version> + <Version>1.8.4</Version> </PropertyGroup> <ItemGroup> diff --git a/src/ResourceTypes.RdsS3/ResourceTypes.RdsS3.csproj b/src/ResourceTypes.RdsS3/ResourceTypes.RdsS3.csproj index e3121aa5a29b048e02912adea70558e6e57427ef..69615bc9bed485e10e8a84eb136cb9eb27ced378 100644 --- a/src/ResourceTypes.RdsS3/ResourceTypes.RdsS3.csproj +++ b/src/ResourceTypes.RdsS3/ResourceTypes.RdsS3.csproj @@ -6,7 +6,7 @@ <Nullable>enable</Nullable> <AssemblyName>Coscine.$(MSBuildProjectName)</AssemblyName> <RootNamespace>Coscine.$(MSBuildProjectName.Replace(" ", "_"))</RootNamespace> - <Version>1.8.1</Version> + <Version>1.8.4</Version> </PropertyGroup> <ItemGroup> diff --git a/src/ResourceTypes.RdsS3Worm/ResourceTypes.RdsS3Worm.csproj b/src/ResourceTypes.RdsS3Worm/ResourceTypes.RdsS3Worm.csproj index a5f61fcb4fe8233e8c24aec29ccccc4314d5b9db..b27b612d8e292e5620172d82571b329c610c7a42 100644 --- a/src/ResourceTypes.RdsS3Worm/ResourceTypes.RdsS3Worm.csproj +++ b/src/ResourceTypes.RdsS3Worm/ResourceTypes.RdsS3Worm.csproj @@ -6,7 +6,7 @@ <Nullable>enable</Nullable> <AssemblyName>Coscine.$(MSBuildProjectName)</AssemblyName> <RootNamespace>Coscine.$(MSBuildProjectName.Replace(" ", "_"))</RootNamespace> - <Version>1.8.1</Version> + <Version>1.8.4</Version> </PropertyGroup> <ItemGroup> diff --git a/src/ResourceTypes.Tests/ResourceTypes.Tests.csproj b/src/ResourceTypes.Tests/ResourceTypes.Tests.csproj index 8abe88d5ce5b0579a83c8d2f76347d6def344058..877bc9047ffb57ac5b1f85250b463283cec579db 100644 --- a/src/ResourceTypes.Tests/ResourceTypes.Tests.csproj +++ b/src/ResourceTypes.Tests/ResourceTypes.Tests.csproj @@ -6,7 +6,7 @@ <Nullable>enable</Nullable> <AssemblyName>Coscine.$(MSBuildProjectName)</AssemblyName> <RootNamespace>Coscine.$(MSBuildProjectName.Replace(" ", "_"))</RootNamespace> - <Version>1.8.1</Version> + <Version>1.8.4</Version> </PropertyGroup> <ItemGroup> diff --git a/src/ResourceTypes/ResourceTypes.csproj b/src/ResourceTypes/ResourceTypes.csproj index 0b29ab96235322be45395d8e76ec78e1ae9b744c..7d409989c1c137b441cc7b97ff719c8a7ab788ce 100644 --- a/src/ResourceTypes/ResourceTypes.csproj +++ b/src/ResourceTypes/ResourceTypes.csproj @@ -6,7 +6,7 @@ <Nullable>enable</Nullable> <RootNamespace>Coscine.$(MSBuildProjectName.Replace(" ", "_"))</RootNamespace> <AssemblyName>Coscine.$(MSBuildProjectName)</AssemblyName> - <Version>1.8.1</Version> + <Version>1.8.4</Version> </PropertyGroup> <PropertyGroup> diff --git a/src/ResourceTypes/SpecificTypesConfig.json b/src/ResourceTypes/SpecificTypesConfig.json index b8dabdd50eab8e7f51d28a7235d9ecfce9adaf3f..af6a017b3108b059992ddf631cc8d6d9a763d315 100644 --- a/src/ResourceTypes/SpecificTypesConfig.json +++ b/src/ResourceTypes/SpecificTypesConfig.json @@ -6,7 +6,7 @@ "de": "GitLab", "en": "GitLab" }, - "status": "hidden", + "status": "active", "supportedOrganizations": [ "*" ] }, "linked": {