From c6ed5df777d2d566d055cfbc1fa795c32d6ba07e Mon Sep 17 00:00:00 2001
From: Nick Floyd <139819+nickfloyd@users.noreply.github.com>
Date: Wed, 3 Aug 2022 17:26:23 +0000
Subject: [PATCH 01/12] Cleaning up compiler warnings
---
.../Clients/RepositoriesClientTests.cs | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)
diff --git a/Octokit.Tests.Integration/Clients/RepositoriesClientTests.cs b/Octokit.Tests.Integration/Clients/RepositoriesClientTests.cs
index c3fba05f45..d651e321a8 100644
--- a/Octokit.Tests.Integration/Clients/RepositoriesClientTests.cs
+++ b/Octokit.Tests.Integration/Clients/RepositoriesClientTests.cs
@@ -536,7 +536,7 @@ public async Task UpdatesNameObsolete()
using (var repoContext = await _github.CreateUserRepositoryContext())
{
var updatedName = Helper.MakeNameWithTimestamp("updated-repo");
- var update = new RepositoryUpdate(updatedName);
+ var update = new RepositoryUpdate() { Name = updatedName };
var updatedRepository = await _github.Repository.Edit(repoContext.RepositoryOwner, repoContext.RepositoryName, update);
@@ -550,7 +550,8 @@ public async Task UpdatesNameWithRepositoryIdObsolete()
using (var repoContext = await _github.CreateUserRepositoryContext())
{
var updatedName = Helper.MakeNameWithTimestamp("updated-repo");
- var update = new RepositoryUpdate(updatedName);
+ var update = new RepositoryUpdate() { Name = updatedName };
+
var updatedRepository = await _github.Repository.Edit(repoContext.RepositoryId, update);
@@ -811,7 +812,7 @@ public async Task UpdatesMergeMethodWithRepositoryId()
Assert.True(editedRepository.AllowAutoMerge);
}
}
-
+
[IntegrationTest]
public async Task UpdatesDeleteBranchOnMergeMethod()
{
@@ -826,7 +827,7 @@ public async Task UpdatesDeleteBranchOnMergeMethod()
Assert.True(repository.DeleteBranchOnMerge);
}
}
-
+
[IntegrationTest]
public async Task UpdatesDeleteBranchOnMergeMethodWithRepositoryId()
{
@@ -1047,7 +1048,7 @@ public async Task ReturnsSpecifiedRepositoryWithLicenseInformation()
Assert.Equal("mit", repository.License.Key);
Assert.Equal("MIT License", repository.License.Name);
}
-
+
[IntegrationTest]
public async Task ReturnsRepositoryDeleteBranchOnMergeOptions()
{
@@ -2099,10 +2100,10 @@ public async Task ReturnsCodeOwnersErrors()
using (var repoContext = await _github.CreateUserRepositoryContext())
{
await _github.Repository.Content.CreateFile(repoContext.RepositoryOwner, repoContext.RepositoryName, ".github/codeowners", new CreateFileRequest("Create codeowners", @"* snyrting6@hotmail.com"));
-
+
// Sometimes it takes a second to create the file
Thread.Sleep(TimeSpan.FromSeconds(2));
-
+
var license = await _github.Repository.GetAllCodeOwnersErrors(repoContext.RepositoryOwner, repoContext.RepositoryName);
Assert.NotEmpty(license.Errors);
}
From 90234a3c67510387674050a3c6d4ee944280b189 Mon Sep 17 00:00:00 2001
From: Nick Floyd <139819+nickfloyd@users.noreply.github.com>
Date: Wed, 3 Aug 2022 17:26:46 +0000
Subject: [PATCH 02/12] Converts projects to only use .NET Standard 2.0
---
Octokit.Reactive/Octokit.Reactive.csproj | 14 ++------------
Octokit/Octokit.csproj | 18 ++----------------
build/Tasks/ValidateLINQPadSamples.cs | 2 +-
3 files changed, 5 insertions(+), 29 deletions(-)
diff --git a/Octokit.Reactive/Octokit.Reactive.csproj b/Octokit.Reactive/Octokit.Reactive.csproj
index 6bcbbfae72..26e70241fd 100644
--- a/Octokit.Reactive/Octokit.Reactive.csproj
+++ b/Octokit.Reactive/Octokit.Reactive.csproj
@@ -6,7 +6,7 @@
GitHub
0.0.0-dev
true
- netstandard2.0;net46
+ netstandard2.0
Octokit.Reactive
Octokit.Reactive
embedded
@@ -19,11 +19,8 @@
Copyright GitHub 2017
-
- 2.0.0
-
-
+ 2.0.0
1591;1701;1702;1705
@@ -44,11 +41,4 @@
-
-
-
-
-
-
-
diff --git a/Octokit/Octokit.csproj b/Octokit/Octokit.csproj
index ace89edc6b..c325bb6a6c 100644
--- a/Octokit/Octokit.csproj
+++ b/Octokit/Octokit.csproj
@@ -6,7 +6,7 @@
GitHub
0.0.0-dev
true
- netstandard2.0;net46
+ netstandard2.0
Octokit
Octokit
embedded
@@ -19,26 +19,12 @@
Copyright GitHub 2017
-
+
$(DefineConstants);HAS_TYPEINFO;SIMPLE_JSON_INTERNAL;SIMPLE_JSON_OBJARRAYINTERNAL;SIMPLE_JSON_READONLY_COLLECTIONS;SIMPLE_JSON_TYPEINFO
2.0.0
-
-
-
- $(DefineConstants);HAS_ENVIRONMENT;HAS_REGEX_COMPILED_OPTIONS;SIMPLE_JSON_INTERNAL;SIMPLE_JSON_OBJARRAYINTERNAL;SIMPLE_JSON_READONLY_COLLECTIONS;HAS_SERVICEPOINTMANAGER
-
-
-
1591;1701;1702;1705
-
-
-
-
-
-
-
diff --git a/build/Tasks/ValidateLINQPadSamples.cs b/build/Tasks/ValidateLINQPadSamples.cs
index 1bfaf1b758..77797757f5 100644
--- a/build/Tasks/ValidateLINQPadSamples.cs
+++ b/build/Tasks/ValidateLINQPadSamples.cs
@@ -17,7 +17,7 @@ public override void Run(Context context)
.Combine("Octokit.Reactive")
.Combine("bin")
.Combine(context.Configuration)
- .Combine("net46")
+ .Combine("netstandard2.0")
.MakeAbsolute(context.Environment)
.FullPath;
From 65ffc4433857b75a1471efc8a84dd43cb8a7b387 Mon Sep 17 00:00:00 2001
From: Nick Floyd <139819+nickfloyd@users.noreply.github.com>
Date: Wed, 3 Aug 2022 17:47:33 +0000
Subject: [PATCH 03/12] Cleans up the cake/build/ci warnings buy updating the
obsolete methods
---
build/Tasks/Build.cs | 2 +-
build/Tasks/ConventionTests.cs | 2 +-
build/Tasks/IntegrationTests.cs | 2 +-
build/Tasks/Package.cs | 2 +-
build/Tasks/Restore.cs | 2 +-
build/Tasks/UnitTests.cs | 2 +-
build/Utilities/ToolInstaller.cs | 10 +++++-----
7 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/build/Tasks/Build.cs b/build/Tasks/Build.cs
index 353c9e10b1..7e03b5bcd1 100644
--- a/build/Tasks/Build.cs
+++ b/build/Tasks/Build.cs
@@ -9,7 +9,7 @@ public class Build : FrostingTask
{
public override void Run(Context context)
{
- context.DotNetCoreBuild("./Octokit.sln", new DotNetCoreBuildSettings
+ context.DotNetBuild("./Octokit.sln", new DotNetCoreBuildSettings
{
Configuration = context.Configuration,
ArgumentCustomization = args => args
diff --git a/build/Tasks/ConventionTests.cs b/build/Tasks/ConventionTests.cs
index d79c7c84e9..96e2b94c25 100644
--- a/build/Tasks/ConventionTests.cs
+++ b/build/Tasks/ConventionTests.cs
@@ -11,7 +11,7 @@ public override void Run(Context context)
foreach (var project in context.Projects.Where(x => x.ConventionTests))
{
context.Information("Executing Convention Tests Project {0}...", project.Name);
- context.DotNetCoreTest(project.Path.FullPath, context.GetTestSettings());
+ context.DotNetTest(project.Path.FullPath, context.GetTestSettings());
}
}
}
diff --git a/build/Tasks/IntegrationTests.cs b/build/Tasks/IntegrationTests.cs
index 9acafeaef7..0f0c411e1d 100644
--- a/build/Tasks/IntegrationTests.cs
+++ b/build/Tasks/IntegrationTests.cs
@@ -12,7 +12,7 @@ public override void Run(Context context)
foreach (var project in context.Projects.Where(x => x.IntegrationTests))
{
context.Information("Executing Integration Tests Project {0}...", project.Name);
- context.DotNetCoreTest(project.Path.FullPath, context.GetTestSettings());
+ context.DotNetTest(project.Path.FullPath, context.GetTestSettings());
}
}
diff --git a/build/Tasks/Package.cs b/build/Tasks/Package.cs
index bbaddd9223..ab0b4948cb 100644
--- a/build/Tasks/Package.cs
+++ b/build/Tasks/Package.cs
@@ -16,7 +16,7 @@ public override void Run(Context context)
if (project.Publish)
{
context.Information("Packing {0}...", project.Name);
- context.DotNetCorePack(project.Path.FullPath, new DotNetCorePackSettings()
+ context.DotNetPack(project.Path.FullPath, new DotNetCorePackSettings()
{
Configuration = context.Configuration,
NoBuild = true,
diff --git a/build/Tasks/Restore.cs b/build/Tasks/Restore.cs
index e84cf90bca..b1d8a16be4 100644
--- a/build/Tasks/Restore.cs
+++ b/build/Tasks/Restore.cs
@@ -8,7 +8,7 @@ public sealed class Restore : FrostingTask
{
public override void Run(Context context)
{
- context.DotNetCoreRestore(".", new DotNetCoreRestoreSettings
+ context.DotNetRestore(".", new DotNetCoreRestoreSettings
{
ArgumentCustomization = args => args
.Append("/p:Version={0}", context.Version.GetSemanticVersion())
diff --git a/build/Tasks/UnitTests.cs b/build/Tasks/UnitTests.cs
index 620cd3838f..2a2529f88d 100644
--- a/build/Tasks/UnitTests.cs
+++ b/build/Tasks/UnitTests.cs
@@ -11,7 +11,7 @@ public override void Run(Context context)
foreach (var project in context.Projects.Where(x => x.UnitTests))
{
context.Information("Executing Unit Tests Project {0}...", project.Name);
- context.DotNetCoreTest(project.Path.FullPath, context.GetTestSettings());
+ context.DotNetTest(project.Path.FullPath, context.GetTestSettings());
}
}
}
diff --git a/build/Utilities/ToolInstaller.cs b/build/Utilities/ToolInstaller.cs
index 1a03d21526..9aff765488 100644
--- a/build/Utilities/ToolInstaller.cs
+++ b/build/Utilities/ToolInstaller.cs
@@ -8,7 +8,7 @@
public static class ToolInstaller
{
- private static DirectoryPath ToolsPath { get; } = "./tools";
+ private static DirectoryPath ToolsPath { get; } = "./tools";
public static void Install(ICakeContext context, string package, string version)
{
context.NuGetInstall(package, new NuGetInstallSettings
@@ -42,10 +42,10 @@ public static FilePath DotNetCoreToolInstall(
: ".exe"
)
);
-
+
if (!context.DirectoryExists(toolInstallPath) && context.FileExists(toolPath))
{
- context.DotNetCoreTool("tool", new DotNetCoreToolSettings
+ context.DotNetTool("tool", new DotNetCoreToolSettings
{
ArgumentCustomization = args => args
.Append("uninstall")
@@ -56,7 +56,7 @@ public static FilePath DotNetCoreToolInstall(
if (!context.FileExists(toolPath))
{
- context.DotNetCoreTool("tool", new DotNetCoreToolSettings
+ context.DotNetTool("tool", new DotNetCoreToolSettings
{
ArgumentCustomization = args => args
.Append("install")
@@ -73,4 +73,4 @@ public static FilePath DotNetCoreToolInstall(
return toolPath;
}
-}
\ No newline at end of file
+}
From c211ee8692c39c050496785b8f09fbd34f53e076 Mon Sep 17 00:00:00 2001
From: Nick Floyd <139819+nickfloyd@users.noreply.github.com>
Date: Wed, 3 Aug 2022 13:06:40 -0500
Subject: [PATCH 04/12] Update Octokit.Reactive/Octokit.Reactive.csproj
Co-authored-by: Jamie Magee
---
Octokit.Reactive/Octokit.Reactive.csproj | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Octokit.Reactive/Octokit.Reactive.csproj b/Octokit.Reactive/Octokit.Reactive.csproj
index 26e70241fd..973ce24e16 100644
--- a/Octokit.Reactive/Octokit.Reactive.csproj
+++ b/Octokit.Reactive/Octokit.Reactive.csproj
@@ -6,7 +6,7 @@
GitHub
0.0.0-dev
true
- netstandard2.0
+ netstandard2.0
Octokit.Reactive
Octokit.Reactive
embedded
From bdafb9fe4d84b9b080d8129c8a34ab203f44a844 Mon Sep 17 00:00:00 2001
From: Nick Floyd <139819+nickfloyd@users.noreply.github.com>
Date: Wed, 3 Aug 2022 19:11:26 +0000
Subject: [PATCH 05/12] updates to use the singular node
---
Octokit/Octokit.csproj | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Octokit/Octokit.csproj b/Octokit/Octokit.csproj
index c325bb6a6c..0ceb4fd7fc 100644
--- a/Octokit/Octokit.csproj
+++ b/Octokit/Octokit.csproj
@@ -6,7 +6,7 @@
GitHub
0.0.0-dev
true
- netstandard2.0
+ netstandard2.0
Octokit
Octokit
embedded
From 559b4fa92c815af7f9bb947f94da2e3153bc4275 Mon Sep 17 00:00:00 2001
From: Nick Floyd <139819+nickfloyd@users.noreply.github.com>
Date: Wed, 3 Aug 2022 19:29:58 +0000
Subject: [PATCH 06/12] updates cake APIs to use the non depricated ones
---
Octokit.Reactive/Octokit.Reactive.csproj | 1 -
Octokit/Octokit.csproj | 1 -
build/Context.cs | 6 +++---
build/Lifetime.cs | 4 ++--
build/Tasks/Build.cs | 6 +++---
build/Tasks/ConventionTests.cs | 2 +-
build/Tasks/IntegrationTests.cs | 4 ++--
build/Tasks/Package.cs | 6 +++---
build/Tasks/Restore.cs | 6 +++---
build/Tasks/UnitTests.cs | 2 +-
build/Utilities/ToolInstaller.cs | 10 +++++-----
11 files changed, 23 insertions(+), 25 deletions(-)
diff --git a/Octokit.Reactive/Octokit.Reactive.csproj b/Octokit.Reactive/Octokit.Reactive.csproj
index 973ce24e16..ef18853a00 100644
--- a/Octokit.Reactive/Octokit.Reactive.csproj
+++ b/Octokit.Reactive/Octokit.Reactive.csproj
@@ -20,7 +20,6 @@
- 2.0.0
1591;1701;1702;1705
diff --git a/Octokit/Octokit.csproj b/Octokit/Octokit.csproj
index 0ceb4fd7fc..0148ebc3eb 100644
--- a/Octokit/Octokit.csproj
+++ b/Octokit/Octokit.csproj
@@ -21,7 +21,6 @@
$(DefineConstants);HAS_TYPEINFO;SIMPLE_JSON_INTERNAL;SIMPLE_JSON_OBJARRAYINTERNAL;SIMPLE_JSON_READONLY_COLLECTIONS;SIMPLE_JSON_TYPEINFO
- 2.0.0
1591;1701;1702;1705
diff --git a/build/Context.cs b/build/Context.cs
index e0af2ff004..f9ede409e5 100644
--- a/build/Context.cs
+++ b/build/Context.cs
@@ -1,6 +1,6 @@
using Cake.Common;
using Cake.Common.Diagnostics;
-using Cake.Common.Tools.DotNetCore.Test;
+using Cake.Common.Tools.DotNet.Test;
using Cake.Core;
using Cake.Core.IO;
using Cake.Frosting;
@@ -28,9 +28,9 @@ public class Context : FrostingContext
public FilePath GitVersionToolPath { get; set; }
- public DotNetCoreTestSettings GetTestSettings()
+ public DotNetTestSettings GetTestSettings()
{
- var settings = new DotNetCoreTestSettings
+ var settings = new DotNetTestSettings
{
Configuration = Configuration,
NoBuild = true
diff --git a/build/Lifetime.cs b/build/Lifetime.cs
index a28729bb13..310841b202 100644
--- a/build/Lifetime.cs
+++ b/build/Lifetime.cs
@@ -51,8 +51,8 @@ public override void Setup(Context context)
new Project { Name = "Octokit.Tests.Integration", Path = "./Octokit.Tests.Integration/Octokit.Tests.Integration.csproj", IntegrationTests = true }
};
- context.GitVersionToolPath = ToolInstaller.DotNetCoreToolInstall(context, "GitVersion.Tool", "5.6.5", "dotnet-gitversion");
- ToolInstaller.DotNetCoreToolInstall(context, "coverlet.console", "1.7.2", "coverlet");
+ context.GitVersionToolPath = ToolInstaller.DotNetToolInstall(context, "GitVersion.Tool", "5.6.5", "dotnet-gitversion");
+ ToolInstaller.DotNetToolInstall(context, "coverlet.console", "1.7.2", "coverlet");
// Calculate semantic version.
context.Version = BuildVersion.Calculate(context);
diff --git a/build/Tasks/Build.cs b/build/Tasks/Build.cs
index 7e03b5bcd1..2e1af6c0ac 100644
--- a/build/Tasks/Build.cs
+++ b/build/Tasks/Build.cs
@@ -1,5 +1,5 @@
-using Cake.Common.Tools.DotNetCore;
-using Cake.Common.Tools.DotNetCore.Build;
+using Cake.Common.Tools.DotNet;
+using Cake.Common.Tools.DotNet.Build;
using Cake.Core;
using Cake.Frosting;
@@ -9,7 +9,7 @@ public class Build : FrostingTask
{
public override void Run(Context context)
{
- context.DotNetBuild("./Octokit.sln", new DotNetCoreBuildSettings
+ context.DotNetBuild("./Octokit.sln", new DotNetBuildSettings
{
Configuration = context.Configuration,
ArgumentCustomization = args => args
diff --git a/build/Tasks/ConventionTests.cs b/build/Tasks/ConventionTests.cs
index 96e2b94c25..41018d2449 100644
--- a/build/Tasks/ConventionTests.cs
+++ b/build/Tasks/ConventionTests.cs
@@ -1,6 +1,6 @@
using System.Linq;
using Cake.Common.Diagnostics;
-using Cake.Common.Tools.DotNetCore;
+using Cake.Common.Tools.DotNet;
using Cake.Frosting;
[IsDependentOn(typeof(Build))]
diff --git a/build/Tasks/IntegrationTests.cs b/build/Tasks/IntegrationTests.cs
index 0f0c411e1d..879305b9e5 100644
--- a/build/Tasks/IntegrationTests.cs
+++ b/build/Tasks/IntegrationTests.cs
@@ -1,7 +1,7 @@
using System.Linq;
using Cake.Common.Diagnostics;
-using Cake.Common.Tools.DotNetCore;
-using Cake.Common.Tools.DotNetCore.Test;
+using Cake.Common.Tools.DotNet;
+using Cake.Common.Tools.DotNet.Test;
using Cake.Frosting;
[IsDependentOn(typeof(Build))]
diff --git a/build/Tasks/Package.cs b/build/Tasks/Package.cs
index ab0b4948cb..ed0ecadbc6 100644
--- a/build/Tasks/Package.cs
+++ b/build/Tasks/Package.cs
@@ -1,6 +1,6 @@
using Cake.Common.Diagnostics;
-using Cake.Common.Tools.DotNetCore;
-using Cake.Common.Tools.DotNetCore.Pack;
+using Cake.Common.Tools.DotNet;
+using Cake.Common.Tools.DotNet.Pack;
using Cake.Core;
using Cake.Frosting;
@@ -16,7 +16,7 @@ public override void Run(Context context)
if (project.Publish)
{
context.Information("Packing {0}...", project.Name);
- context.DotNetPack(project.Path.FullPath, new DotNetCorePackSettings()
+ context.DotNetPack(project.Path.FullPath, new DotNetPackSettings()
{
Configuration = context.Configuration,
NoBuild = true,
diff --git a/build/Tasks/Restore.cs b/build/Tasks/Restore.cs
index b1d8a16be4..34500c3830 100644
--- a/build/Tasks/Restore.cs
+++ b/build/Tasks/Restore.cs
@@ -1,5 +1,5 @@
-using Cake.Common.Tools.DotNetCore;
-using Cake.Common.Tools.DotNetCore.Restore;
+using Cake.Common.Tools.DotNet;
+using Cake.Common.Tools.DotNet.Restore;
using Cake.Core;
using Cake.Frosting;
@@ -8,7 +8,7 @@ public sealed class Restore : FrostingTask
{
public override void Run(Context context)
{
- context.DotNetRestore(".", new DotNetCoreRestoreSettings
+ context.DotNetRestore(".", new DotNetRestoreSettings
{
ArgumentCustomization = args => args
.Append("/p:Version={0}", context.Version.GetSemanticVersion())
diff --git a/build/Tasks/UnitTests.cs b/build/Tasks/UnitTests.cs
index 2a2529f88d..7b760ba9b5 100644
--- a/build/Tasks/UnitTests.cs
+++ b/build/Tasks/UnitTests.cs
@@ -1,6 +1,6 @@
using System.Linq;
using Cake.Common.Diagnostics;
-using Cake.Common.Tools.DotNetCore;
+using Cake.Common.Tool;
using Cake.Frosting;
[IsDependentOn(typeof(Build))]
diff --git a/build/Utilities/ToolInstaller.cs b/build/Utilities/ToolInstaller.cs
index 9aff765488..c2e0fcb21f 100644
--- a/build/Utilities/ToolInstaller.cs
+++ b/build/Utilities/ToolInstaller.cs
@@ -1,6 +1,6 @@
using Cake.Common.IO;
-using Cake.Common.Tools.DotNetCore;
-using Cake.Common.Tools.DotNetCore.Tool;
+using Cake.Common.Tools.DotNet;
+using Cake.Common.Tools.DotNet.Tool;
using Cake.Common.Tools.NuGet;
using Cake.Common.Tools.NuGet.Install;
using Cake.Core;
@@ -19,7 +19,7 @@ public static void Install(ICakeContext context, string package, string version)
});
}
- public static FilePath DotNetCoreToolInstall(
+ public static FilePath DotNetToolInstall(
this ICakeContext context,
string package,
string version,
@@ -45,7 +45,7 @@ public static FilePath DotNetCoreToolInstall(
if (!context.DirectoryExists(toolInstallPath) && context.FileExists(toolPath))
{
- context.DotNetTool("tool", new DotNetCoreToolSettings
+ context.DotNetTool("tool", new DotNetToolSettings
{
ArgumentCustomization = args => args
.Append("uninstall")
@@ -56,7 +56,7 @@ public static FilePath DotNetCoreToolInstall(
if (!context.FileExists(toolPath))
{
- context.DotNetTool("tool", new DotNetCoreToolSettings
+ context.DotNetTool("tool", new DotNetToolSettings
{
ArgumentCustomization = args => args
.Append("install")
From 3ca846fbd39cc8a62c7aaceddd3d39a75381f5b9 Mon Sep 17 00:00:00 2001
From: Nick Floyd <139819+nickfloyd@users.noreply.github.com>
Date: Wed, 3 Aug 2022 19:32:38 +0000
Subject: [PATCH 07/12] corrects typo in namespace
---
build/Tasks/UnitTests.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/build/Tasks/UnitTests.cs b/build/Tasks/UnitTests.cs
index 7b760ba9b5..1fa282bccb 100644
--- a/build/Tasks/UnitTests.cs
+++ b/build/Tasks/UnitTests.cs
@@ -1,6 +1,6 @@
using System.Linq;
using Cake.Common.Diagnostics;
-using Cake.Common.Tool;
+using Cake.Common.Tools;
using Cake.Frosting;
[IsDependentOn(typeof(Build))]
From 02116bd4c373dee5d0525859651ddd9611dbecfa Mon Sep 17 00:00:00 2001
From: Nick Floyd <139819+nickfloyd@users.noreply.github.com>
Date: Wed, 3 Aug 2022 19:55:50 +0000
Subject: [PATCH 08/12] implements the correct method via namespace
---
build/Tasks/UnitTests.cs | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/build/Tasks/UnitTests.cs b/build/Tasks/UnitTests.cs
index 1fa282bccb..e3ae4682ae 100644
--- a/build/Tasks/UnitTests.cs
+++ b/build/Tasks/UnitTests.cs
@@ -1,7 +1,8 @@
using System.Linq;
+using Cake.Frosting;
using Cake.Common.Diagnostics;
using Cake.Common.Tools;
-using Cake.Frosting;
+using Cake.Common.Tools.DotNet;
[IsDependentOn(typeof(Build))]
public sealed class UnitTests : FrostingTask
From d7314bf0a79754981ddb261bf66b766d241390a9 Mon Sep 17 00:00:00 2001
From: Nick Floyd <139819+nickfloyd@users.noreply.github.com>
Date: Wed, 3 Aug 2022 20:15:49 +0000
Subject: [PATCH 09/12] includes a version of System.Reactive that a .net core
3.1 app can use
---
Octokit.Reactive/Octokit.Reactive.csproj | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Octokit.Reactive/Octokit.Reactive.csproj b/Octokit.Reactive/Octokit.Reactive.csproj
index ef18853a00..f870a6f2bd 100644
--- a/Octokit.Reactive/Octokit.Reactive.csproj
+++ b/Octokit.Reactive/Octokit.Reactive.csproj
@@ -37,7 +37,7 @@
-
+
From 98ac272def3434e1599bc6886da766ec7181d37d Mon Sep 17 00:00:00 2001
From: Nick Floyd <139819+nickfloyd@users.noreply.github.com>
Date: Wed, 3 Aug 2022 20:39:01 +0000
Subject: [PATCH 10/12] adds CopyLocalLockFileAssemblies so that
System.Reactive gets copied during CI - since no .net framework version is
specified
---
Octokit.Reactive/Octokit.Reactive.csproj | 1 +
1 file changed, 1 insertion(+)
diff --git a/Octokit.Reactive/Octokit.Reactive.csproj b/Octokit.Reactive/Octokit.Reactive.csproj
index f870a6f2bd..0ba912abf4 100644
--- a/Octokit.Reactive/Octokit.Reactive.csproj
+++ b/Octokit.Reactive/Octokit.Reactive.csproj
@@ -7,6 +7,7 @@
0.0.0-dev
true
netstandard2.0
+ true
Octokit.Reactive
Octokit.Reactive
embedded
From 87b25e5e53ec70fa4e527a4e4a84c40dbcb3ade1 Mon Sep 17 00:00:00 2001
From: Nick Floyd <139819+nickfloyd@users.noreply.github.com>
Date: Thu, 4 Aug 2022 14:00:15 +0000
Subject: [PATCH 11/12] removes obsolite constructor and tests.
---
.../Clients/RepositoriesClientTests.cs | 29 -------------------
Octokit/Models/Request/RepositoryUpdate.cs | 11 -------
2 files changed, 40 deletions(-)
diff --git a/Octokit.Tests.Integration/Clients/RepositoriesClientTests.cs b/Octokit.Tests.Integration/Clients/RepositoriesClientTests.cs
index d651e321a8..0492ffa1b4 100644
--- a/Octokit.Tests.Integration/Clients/RepositoriesClientTests.cs
+++ b/Octokit.Tests.Integration/Clients/RepositoriesClientTests.cs
@@ -530,35 +530,6 @@ public async Task UpdatesNameWithRepositoryId()
}
}
- [IntegrationTest]
- public async Task UpdatesNameObsolete()
- {
- using (var repoContext = await _github.CreateUserRepositoryContext())
- {
- var updatedName = Helper.MakeNameWithTimestamp("updated-repo");
- var update = new RepositoryUpdate() { Name = updatedName };
-
- var updatedRepository = await _github.Repository.Edit(repoContext.RepositoryOwner, repoContext.RepositoryName, update);
-
- Assert.Equal(update.Name, updatedRepository.Name);
- }
- }
-
- [IntegrationTest]
- public async Task UpdatesNameWithRepositoryIdObsolete()
- {
- using (var repoContext = await _github.CreateUserRepositoryContext())
- {
- var updatedName = Helper.MakeNameWithTimestamp("updated-repo");
- var update = new RepositoryUpdate() { Name = updatedName };
-
-
- var updatedRepository = await _github.Repository.Edit(repoContext.RepositoryId, update);
-
- Assert.Equal(update.Name, updatedRepository.Name);
- }
- }
-
[IntegrationTest]
public async Task UpdatesDescription()
{
diff --git a/Octokit/Models/Request/RepositoryUpdate.cs b/Octokit/Models/Request/RepositoryUpdate.cs
index 7e8e3438cb..02dda177e3 100644
--- a/Octokit/Models/Request/RepositoryUpdate.cs
+++ b/Octokit/Models/Request/RepositoryUpdate.cs
@@ -16,17 +16,6 @@ public class RepositoryUpdate
///
public RepositoryUpdate() { }
- ///
- /// Creates an object that describes an update to a repository on GitHub.
- ///
- /// The name of the repository. This is the only required parameter.
- [Obsolete("Use the constructor with no parameters as name is no longer a required field")]
- public RepositoryUpdate(string name)
- {
- Ensure.ArgumentNotNullOrEmptyString(name, nameof(name));
- Name = name;
- }
-
///
/// Required. Gets or sets the repository name.
///
From db363f5873acf77aefa055dcecc6bcfe0ca25ed6 Mon Sep 17 00:00:00 2001
From: Nick Floyd <139819+nickfloyd@users.noreply.github.com>
Date: Thu, 4 Aug 2022 14:16:06 +0000
Subject: [PATCH 12/12] patches up tests
---
Octokit.Tests/Clients/RepositoriesClientTests.cs | 6 +++---
Octokit.Tests/Reactive/ObservableRepositoriesClientTests.cs | 6 +++---
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/Octokit.Tests/Clients/RepositoriesClientTests.cs b/Octokit.Tests/Clients/RepositoriesClientTests.cs
index 40f72252b2..c7496d35b8 100644
--- a/Octokit.Tests/Clients/RepositoriesClientTests.cs
+++ b/Octokit.Tests/Clients/RepositoriesClientTests.cs
@@ -1129,7 +1129,7 @@ public void PatchesCorrectUrl()
{
var connection = Substitute.For();
var client = new RepositoriesClient(connection);
- var update = new RepositoryUpdate("repo");
+ var update = new RepositoryUpdate() { Name= "repo" };
client.Edit("owner", "repo", update);
@@ -1143,7 +1143,7 @@ public void PatchesCorrectUrlWithRepositoryId()
{
var connection = Substitute.For();
var client = new RepositoriesClient(connection);
- var update = new RepositoryUpdate("repo");
+ var update = new RepositoryUpdate() { Name= "repo" };
client.Edit(1, update);
@@ -1155,7 +1155,7 @@ public void PatchesCorrectUrlWithRepositoryId()
public async Task EnsuresNonNullArguments()
{
var client = new RepositoriesClient(Substitute.For());
- var update = new RepositoryUpdate("anyreponame");
+ var update = new RepositoryUpdate() { Name= "anyreponame" };
await Assert.ThrowsAsync(() => client.Edit(null, "repo", update));
await Assert.ThrowsAsync(() => client.Edit("owner", null, update));
diff --git a/Octokit.Tests/Reactive/ObservableRepositoriesClientTests.cs b/Octokit.Tests/Reactive/ObservableRepositoriesClientTests.cs
index 747fd1d4fb..469d0a9c62 100644
--- a/Octokit.Tests/Reactive/ObservableRepositoriesClientTests.cs
+++ b/Octokit.Tests/Reactive/ObservableRepositoriesClientTests.cs
@@ -846,7 +846,7 @@ public void PatchsTheCorrectUrl()
{
var github = Substitute.For();
var client = new ObservableRepositoriesClient(github);
- var update = new RepositoryUpdate("anyreponame");
+ var update = new RepositoryUpdate(){ Name= "anyreponame" };
client.Edit("owner", "repo", update);
@@ -858,7 +858,7 @@ public void PatchsTheCorrectUrlWithRepositoryId()
{
var github = Substitute.For();
var client = new ObservableRepositoriesClient(github);
- var update = new RepositoryUpdate("anyreponame");
+ var update = new RepositoryUpdate(){ Name= "anyreponame" };
client.Edit(1, update);
@@ -869,7 +869,7 @@ public void PatchsTheCorrectUrlWithRepositoryId()
public async Task EnsuresNonNullArguments()
{
var client = new ObservableRepositoriesClient(Substitute.For());
- var update = new RepositoryUpdate("anyreponame");
+ var update = new RepositoryUpdate() { Name= "anyreponame" };
Assert.Throws(() => client.Edit(null, "repo", update));
Assert.Throws(() => client.Edit("owner", null, update));