From 7a7b21cbd35dcca83db5f0ac6f2ed53dc99d7649 Mon Sep 17 00:00:00 2001 From: Brendan Forster Date: Sat, 23 Jul 2016 12:00:18 -0700 Subject: [PATCH 1/5] bump release notes --- ReleaseNotes.md | 4 ++++ SolutionInfo.cs | 8 ++++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/ReleaseNotes.md b/ReleaseNotes.md index 801f9cef..0c7f148d 100644 --- a/ReleaseNotes.md +++ b/ReleaseNotes.md @@ -1,3 +1,7 @@ +### New in 0.21.0 (released 2016/07/29) + +**TODO** + ### New in 0.20.0 (released 2016/06/15) **Features** diff --git a/SolutionInfo.cs b/SolutionInfo.cs index 785d8844..034d9815 100644 --- a/SolutionInfo.cs +++ b/SolutionInfo.cs @@ -3,12 +3,12 @@ using System.Reflection; using System.Runtime.InteropServices; [assembly: AssemblyProductAttribute("Octokit")] -[assembly: AssemblyVersionAttribute("0.20.0")] -[assembly: AssemblyFileVersionAttribute("0.20.0")] +[assembly: AssemblyVersionAttribute("0.21.0")] +[assembly: AssemblyFileVersionAttribute("0.21.0")] [assembly: ComVisibleAttribute(false)] namespace System { internal static class AssemblyVersionInformation { - internal const string Version = "0.20.0"; - internal const string InformationalVersion = "0.20.0"; + internal const string Version = "0.21.0"; + internal const string InformationalVersion = "0.21.0"; } } From 5579c1f3fb3e398e4624d511c0269cec24749291 Mon Sep 17 00:00:00 2001 From: Brendan Forster Date: Sat, 23 Jul 2016 12:49:37 -0700 Subject: [PATCH 2/5] update linqpad tests to use correct APIs --- samples/linqpad-samples/2-releases.linq | 6 +++--- .../5-interact-with-git-database.linq | 12 ++++++------ samples/linqpad-samples/6-create-repository.linq | 16 ++++++++-------- 3 files changed, 17 insertions(+), 17 deletions(-) diff --git a/samples/linqpad-samples/2-releases.linq b/samples/linqpad-samples/2-releases.linq index 314a9526..a95d3e46 100644 --- a/samples/linqpad-samples/2-releases.linq +++ b/samples/linqpad-samples/2-releases.linq @@ -18,17 +18,17 @@ async Task Main(string[] args) var client = new GitHubClient(new Octokit.ProductHeaderValue("octokit.samples")); //Get releases for the octokit - var releases = await client.Release.GetAll(owner, reponame); + var releases = await client.Repository.Release.GetAll(owner, reponame); releases.Select(r => new { r.Name, r.Body }).Dump("Releases"); //Don't want draft release and because we are using reactive the first one is the latest one. var latestrelease = releases.First(r => r.Draft == false).Dump("Latest Octokit"); //Gets the assets for the latest relase - var assets = await client.Release.GetAllAssets(owner,reponame,latestrelease.Id); + var assets = await client.Repository.Release.GetAllAssets(owner,reponame,latestrelease.Id); assets.Dump("Assets"); var latestreleaseassetid = assets.First(a => a.Name.Contains("Reactive")).Id; - var asset = await client.Release.GetAsset(owner,reponame,latestreleaseassetid); + var asset = await client.Repository.Release.GetAsset(owner,reponame,latestreleaseassetid); asset.DownloadCount.Dump("Download Count for this release"); //Download the release diff --git a/samples/linqpad-samples/5-interact-with-git-database.linq b/samples/linqpad-samples/5-interact-with-git-database.linq index 1c875ad5..77ef6ee0 100644 --- a/samples/linqpad-samples/5-interact-with-git-database.linq +++ b/samples/linqpad-samples/5-interact-with-git-database.linq @@ -15,10 +15,10 @@ async Task Main(string[] args) owner = "octokit"; reponame = "octokit.net"; - - - var releases = await client.Release.GetAll(owner, reponame); - + + + var releases = await client.Repository.Release.GetAll(owner, reponame); + // we have to build up this tag because release tags // are just lightweight tags. you can read more about // the differences between lightweight tags and annotated tags @@ -26,10 +26,10 @@ async Task Main(string[] args) // we can fetch the tag for this release var reference = "tags/" + releases[0].TagName; - var tag = await client.GitDatabase.Reference.Get(owner, reponame, reference); + var tag = await client.Git.Reference.Get(owner, reponame, reference); tag.Dump(); // and we can fetch the commit associated with this release - var commit = await client.GitDatabase.Commit.Get(owner, reponame, tag.Object.Sha); + var commit = await client.Git.Commit.Get(owner, reponame, tag.Object.Sha); commit.Dump(); } \ No newline at end of file diff --git a/samples/linqpad-samples/6-create-repository.linq b/samples/linqpad-samples/6-create-repository.linq index 1caa020f..f6f0d54b 100644 --- a/samples/linqpad-samples/6-create-repository.linq +++ b/samples/linqpad-samples/6-create-repository.linq @@ -44,8 +44,8 @@ async Task Main(string[] args) + DateTime.Now.ToString(), Encoding = EncodingType.Utf8 }; - - var createdBlob = await client.GitDatabase.Blob + + var createdBlob = await client.Git.Blob .Create(owner, reponame, newBlob); createdBlob.Dump(); @@ -57,14 +57,14 @@ async Task Main(string[] args) Sha = createdBlob.Sha, Type = TreeType.Blob }); - - var createdTree = await client.GitDatabase.Tree + + var createdTree = await client.Git.Tree .Create(owner, reponame, newTree); createdTree.Dump(); // 4 - this commit should build on the current master branch - var master = await client.GitDatabase.Reference + var master = await client.Git.Reference .Get(owner, reponame, "heads/master"); var newCommit = new NewCommit( @@ -72,15 +72,15 @@ async Task Main(string[] args) createdTree.Sha, new[] { master.Object.Sha }) { Author = new Committer(owner,email,DateTime.UtcNow)}; - - var createdCommit = await client.GitDatabase.Commit + + var createdCommit = await client.Git.Commit .Create(owner, reponame, newCommit); createdCommit.Dump(); // 5 - create a reference for the master branch var updateReference = new ReferenceUpdate(createdCommit.Sha); - var updatedReference = await client.GitDatabase + var updatedReference = await client.Git .Reference.Update(owner, reponame, "heads/master", updateReference); updatedReference.Dump(); From 2686ccecbe6456d5b2730e90147dc91d08f34d29 Mon Sep 17 00:00:00 2001 From: Brendan Forster Date: Sat, 23 Jul 2016 16:36:23 -0700 Subject: [PATCH 3/5] tweaking integration tests --- .../Clients/RepositoryHooksClientTests.cs | 4 ++-- .../fixtures/RepositoriesHooksFixture.cs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Octokit.Tests.Integration/Clients/RepositoryHooksClientTests.cs b/Octokit.Tests.Integration/Clients/RepositoryHooksClientTests.cs index 6b0937ca..a4c84047 100644 --- a/Octokit.Tests.Integration/Clients/RepositoryHooksClientTests.cs +++ b/Octokit.Tests.Integration/Clients/RepositoryHooksClientTests.cs @@ -342,7 +342,7 @@ namespace Octokit.Tests.Integration.Clients var actualHook = await github.Repository.Hooks.Edit(_fixture.RepositoryId, _fixture.ExpectedHooks[1].Id, editRepositoryHook); var expectedConfig = new Dictionary { { "content_type", "json" }, { "url", "http://test.com/example" } }; - Assert.Equal(new[] { "deployment", "pull_request" }.ToList(), actualHook.Events.ToList()); + Assert.Equal(new[] { "push", "pull_request" }.ToList(), actualHook.Events.ToList()); Assert.Equal(expectedConfig.Keys, actualHook.Config.Keys); Assert.Equal(expectedConfig.Values, actualHook.Config.Values); } @@ -378,7 +378,7 @@ namespace Octokit.Tests.Integration.Clients var actualHook = await github.Repository.Hooks.Edit(_fixture.RepositoryId, _fixture.ExpectedHooks[3].Id, editRepositoryHook); var expectedConfig = new Dictionary { { "project", "GEZDGORQFY2TCNZRGY2TSMBVGUYDK" } }; - Assert.Equal(new[] { "deployment", "pull_request" }.ToList(), actualHook.Events.ToList()); + Assert.Equal(new[] { "push", "pull_request" }.ToList(), actualHook.Events.ToList()); Assert.Equal(expectedConfig.Keys, actualHook.Config.Keys); Assert.Equal(expectedConfig.Values, actualHook.Config.Values); } diff --git a/Octokit.Tests.Integration/fixtures/RepositoriesHooksFixture.cs b/Octokit.Tests.Integration/fixtures/RepositoriesHooksFixture.cs index 0e713acc..e7c8cdb3 100644 --- a/Octokit.Tests.Integration/fixtures/RepositoriesHooksFixture.cs +++ b/Octokit.Tests.Integration/fixtures/RepositoriesHooksFixture.cs @@ -20,7 +20,7 @@ namespace Octokit.Tests.Integration.fixtures CreateHook(_github, _repository, "awsopsworks", "push"), CreateHook(_github, _repository, "activecollab", "push"), CreateHook(_github, _repository, "acunote", "push"), - CreateHook(_github, _repository, "agilebench", "push") + CreateHook(_github, _repository, "agilezen", "push") }; _hook = _hooks[0]; } From 26e304675fd6bf48770dbf6cc8863ed890e3ee94 Mon Sep 17 00:00:00 2001 From: Brendan Forster Date: Thu, 28 Jul 2016 09:29:27 +1000 Subject: [PATCH 4/5] wrote some release notes --- ReleaseNotes.md | 39 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 38 insertions(+), 1 deletion(-) diff --git a/ReleaseNotes.md b/ReleaseNotes.md index 0c7f148d..f56e4373 100644 --- a/ReleaseNotes.md +++ b/ReleaseNotes.md @@ -1,6 +1,43 @@ ### New in 0.21.0 (released 2016/07/29) -**TODO** +**Features** + +This release adds support across Octokit.net for providing the repository Id +rather than a name/owner pair. The repository Id does not change when transferring +ownership of a repository, and is more robust for API callers. This work +was lead by @dampir as part of Google Summer of Code 2016. + + - Added new fields for Deployment and DeploymentStatus preview API - #1365 via @ErikSchierboom + - Added new fields for signature verification to Git Data Tag API - #1420 via @Sarmad93 + - Added new fields for GitHub Pages preview API - #1421 via @dampir + +**Fixes** + + - Fix serialization of enum value attributes - #1402 via @maddin2016 + - Fix searching for repositories with underscore in name - #1418 via @dsplaisted, @shiftkey + +**Other** + + - Clarified obsolete warnings for Protected Branch preview API - #1428 via @ryangribble + - Remove Obsolete items - #1422 via @ryangribble + +**Breaking Changes** + +After a long grace period, #1422 has removed these obsoleted members. These features +exist in other parts of the API surface: + + - `I(Observable)GitHubClient.Release` + - `I(Observable)GitHubClient.Notification` + - `I(Observable)GitHubClient.GitDatabase` + - `I(Observable)GitHubClient.SshKey` + - `I(Observable)GitHubClient.Repository.RepositoryComments` + - `I(Observable)GitHubClient.Repository.CommitStatus` + - `I(Observable)GitHubClient.Repository.RepoCollaborators` + - `I(Observable)GitHubClient.Repository.Commits` + +This method has also been removed, but is no longer supported through the API: + + - `I(Observable)GitHubClient.Authorization.RevokeAllApplicationAuthentications()` ### New in 0.20.0 (released 2016/06/15) From 1737dccbfff9345cc4df45e1c2bd5a89af5850ce Mon Sep 17 00:00:00 2001 From: Brendan Forster Date: Thu, 28 Jul 2016 14:59:19 +1000 Subject: [PATCH 5/5] tweak release notes --- ReleaseNotes.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ReleaseNotes.md b/ReleaseNotes.md index f56e4373..051042d0 100644 --- a/ReleaseNotes.md +++ b/ReleaseNotes.md @@ -35,7 +35,7 @@ exist in other parts of the API surface: - `I(Observable)GitHubClient.Repository.RepoCollaborators` - `I(Observable)GitHubClient.Repository.Commits` -This method has also been removed, but is no longer supported through the API: +This method is no longer supported through the API and has been removed from Octokit.net.: - `I(Observable)GitHubClient.Authorization.RevokeAllApplicationAuthentications()`