Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v0.20 - Probably Australian #1377

Merged
merged 5 commits into from
Jun 14, 2016
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Octokit.Tests.Integration/Clients/PullRequestsClientTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ public async Task ReturnsCorrectCountOfPullRequestsWithStart()
{
PageSize = 1,
PageCount = 1,
StartPage = 2
StartPage = 1
};

var pullRequests = await _fixture.GetAllForRepository(Helper.UserName, _context.RepositoryName, options);
Expand Down Expand Up @@ -174,7 +174,7 @@ public async Task ReturnsCorrectCountOfPullRequestsWithStartParameterized()
{
PageSize = 1,
PageCount = 1,
StartPage = 2
StartPage = 1
};

var openPullRequests = new PullRequestRequest { State = ItemStateFilter.Open };
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -852,7 +852,7 @@ public async Task GetsPagesOfBranches()
var secondPageOptions = new ApiOptions
{
PageSize = 5,
StartPage = 1,
StartPage = 2,
PageCount = 1
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ public async Task GetsArchiveForReleaseBranchAsTarball()
var archive = await github
.Repository
.Content
.GetArchive("alfhenrik", "ScriptCs.OctoKit", ArchiveFormat.Tarball, "dev");
.GetArchive("alfhenrik", "ScriptCs.OctoKit", ArchiveFormat.Tarball, "master");
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This branch was removed on the repository 😢

Copy link
Contributor

@hnrkndrssn hnrkndrssn Jun 14, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💩 sorry! 😇

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@alfhenrik all good, once I realised what was happening it was an easy fix 😀


Assert.NotEmpty(archive);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ public async Task EditHookWithNoNewConfigRetainsTheOldConfig()
var actualHook = await github.Repository.Hooks.Edit(_fixture.RepositoryOwner, _fixture.RepositoryName, _fixture.ExpectedHook.Id, editRepositoryHook);

var expectedConfig = new Dictionary<string, string> { { "content_type", "json" }, { "url", "http://test.com/example" } };
Assert.Equal(new[] { "commit_comment", "pull_request" }.ToList(), actualHook.Events.ToList());
Assert.Equal(new[] { "deployment", "pull_request" }.ToList(), actualHook.Events.ToList());
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This property is unrelated to the test itself, so cleaning it up...

Assert.Equal(expectedConfig.Keys, actualHook.Config.Keys);
Assert.Equal(expectedConfig.Values, actualHook.Config.Values);
}
Expand All @@ -214,7 +214,7 @@ public async Task EditHookWithNewInformation()
var actualHook = await github.Repository.Hooks.Edit(_fixture.RepositoryOwner, _fixture.RepositoryName, _fixture.ExpectedHook.Id, editRepositoryHook);

var expectedConfig = new Dictionary<string, string> { { "project", "GEZDGORQFY2TCNZRGY2TSMBVGUYDK" } };
Assert.Equal(new[] { "commit_comment", "pull_request" }.ToList(), actualHook.Events.ToList());
Assert.Equal(new[] { "deployment", "pull_request" }.ToList(), actualHook.Events.ToList());
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⬆️

Assert.Equal(expectedConfig.Keys, actualHook.Config.Keys);
Assert.Equal(expectedConfig.Values, actualHook.Config.Values);
}
Expand Down Expand Up @@ -276,7 +276,7 @@ public async Task DeleteCreatedWebHook()
await github.Repository.Hooks.Delete(_fixture.RepositoryOwner, _fixture.RepositoryName, _fixture.ExpectedHook.Id);
var hooks = await github.Repository.Hooks.GetAll(_fixture.RepositoryOwner, _fixture.RepositoryName);

Assert.Empty(hooks);
Assert.Equal(4, hooks.Count);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Each test creates the same five hooks, so we need to verify the count of the list to be N-1

}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -169,10 +169,18 @@ public TheGetAllIssuesForRepositoryMethod()
{
_eventsClient = new ObservableEventsClient(Helper.GetAuthenticatedClient());
}

[IntegrationTest]
public async Task ReturnsRepositoryEvents()
{
var repositoryEvents = await _eventsClient.GetAllIssuesForRepository(owner, name).ToList();
var options = new ApiOptions
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not really needed, but I found this while looking into #1374 / #1251

{
PageCount = 1,
StartPage = 1,
PageSize = 5
};

var repositoryEvents = await _eventsClient.GetAllIssuesForRepository(owner, name, options).ToList();

Assert.NotEmpty(repositoryEvents);
}
Expand Down
57 changes: 57 additions & 0 deletions ReleaseNotes.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,60 @@
### New in 0.20.0 (released 2016/06/15)

**Features**

Pagination support has been added, letting you control how much data you want
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"has been added" is passive voice and kind of redundant. How about

Pagination support lets you control how much ...

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, after looking down, I see that "Pagination Support" is being called out in a special manner and isn't in the bulleted list. Maybe we should call out why. For example:

The big focus of this release is pagination support. Pagination support lets you control...

to retrieve for a `GetAll` endpoint. This was a team effort to apply this
across the entire codebase, with contributions from @dampir, @devkhan,
@prayankmathur, @SamTheDev and @shiftkey.

For more information about how to use pagination in your projects refer to the
documentation: http://octokitnet.readthedocs.io/en/latest/extensibility/#pagination

- Add Migrations API for Enterprise instances - #1141 via @devkhan
- Add Issue Lock/Unlock functionality - #1185 via @prayankmathur
- Added Commit Reference SHA-1 API - #1195 via @ryangribble
- Add additional parameters to `SearchIssuesRequest` - #1228 via @ryangribble
- Add `Importer` property to Meta endpoint - #1235 via @ryangribble
- Raise HTTP 451 exception when repository has DMCA notice - #1239 via @devkhan
- Add Merge and Squash preview API - #1245 via @Sarmad93
- Add additional methods to `IEventsClient` - #1288 via @drasticactions
- Add Organization Permissions preview API - #1342 via @ryangribble
- Add GPG Keys preview API - #1343 via @alfhenrik

**Fixes**

- Renamed `IUserKeysClient.GetAll()` to `IUserKeysClient.GetAllForCurrent()` - #1139 via ryangribble
- Add `ItemStateFilter` enum to differentiate between search and list endpoints - #1140 via @prayankmathur
- `RepositoriesClient.GetAllPublic()` fails for Enterprise instanes due to URI structure - #1204 via @ryangribble
- `ConfigureAwait(false)` usages added, eliminating deadlocks - #1248 via @shiftkey
- Renamed `CompareResult.MergedBaseCommit` to fix serialization issue - #1265 via @kivancmuslu
- Activity Feed now returns issues and repository events - #1288 via @drasticactions
- Add `Repository` property to `Issue` response - #1292 via @M-Zuber
- `SearchCodeRequest` now supports searching without specifying a term - #1338 via @dsplaisted
- Add required Permission parameter to team management APIs - #1347 via @ryangribble
- Add `ClosedBy` property to `Issue` - #1353 via @maddin2016

**Other**

- Deleting now-obsolete code - #1224 via @M-Zuber
- Centralize and cleanup the `Uri`s created in Octokit - #1287, #1290 via @dampir
- Updated documentation links - #1289 via @radu-matei, #1250 via @SamTheDev

**Breaking Changes**

- `CompareResult.MergedBaseCommit` was never deserialized correctly, and has
been marked as obsolete. You should use `CompareResult.MergeBaseCommit`
instead (note the lack of a `d`).

- `IEventsClient.GetAllForRepository` was incorrectly retrieving issue
events before this release. Use the new `IEventsClient.GetAllIssuesForRepository`
method if you still require issues, or continue to use `IEventsClient.GetAllForRepository`
if you require all repository events.

- `IUsersClient` has a property named `Keys` which has been renamed in the
GitHub API documentation - Octokit has added the name `GitSshKeys` to
reflect this change, and `Keys` will be removed in a later release.

### New in 0.19.0 (released 2016/03/11)

**Features**
Expand Down
6 changes: 3 additions & 3 deletions SolutionInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
using System.Runtime.InteropServices;

[assembly: AssemblyProductAttribute("Octokit")]
[assembly: AssemblyVersionAttribute("0.19.0")]
[assembly: AssemblyFileVersionAttribute("0.19.0")]
[assembly: AssemblyVersionAttribute("0.20.0")]
[assembly: AssemblyFileVersionAttribute("0.20.0")]
[assembly: ComVisibleAttribute(false)]
namespace System {
internal static class AssemblyVersionInformation {
internal const string Version = "0.19.0";
internal const string Version = "0.20.0";
}
}