Release v0.30 - Where Have You Been All My Life? (#1816)

* run FormatCode build task to fix whitespace/formatting

* correctly flag some GitHub Enterprise tests

* Add Release Notes

* tweak appveyor to not build branch in the repo, when a PR exists already

* travis to only build master branch and PRs

* output actual "dotnet run" command being executed for cake.frosting builds

* update latest Cake.Frosting

* use normal verbosity at the moment due to apparent conflict with "verbose" and latest SDK on appveyor

* try using double dash so dotnet executable doesnt look at --verbosity argument

* travis OSX couldn't download SDK 2.0.3 anymore, lets try the latest 2.1.300
This commit is contained in:
Ryan Gribble
2018-06-18 08:34:14 +10:00
committed by GitHub
parent 596d0cfdcc
commit 3b2be81486
20 changed files with 110 additions and 31 deletions

View File

@@ -5,10 +5,14 @@ matrix:
- os: linux
dist: trusty
sudo: required
dotnet: 2.0.3
dotnet: 2.1.300
- os: osx
osx_image: xcode8.3
dotnet: 2.0.3
dotnet: 2.1.300
branches:
only:
- "master"
before_script:
- if test "$TRAVIS_OS_NAME" == "osx"; then export FrameworkPathOverride=/Library/Frameworks/Mono.framework/Versions/Current/lib/mono/4.5/; else export FrameworkPathOverride=/usr/lib/mono/4.5/; fi

View File

@@ -164,7 +164,7 @@ public class EnterprisePreReceiveEnvironmentsClientTests
_preReceiveEnvironmentsClient = _githubEnterprise.Enterprise.PreReceiveEnvironment;
}
[Fact]
[GitHubEnterpriseTest]
public async Task CanCreatePreReceiveEnvironment()
{
PreReceiveEnvironment preReceiveEnvironment = null;
@@ -185,7 +185,7 @@ public class EnterprisePreReceiveEnvironmentsClientTests
}
}
[Fact]
[GitHubEnterpriseTest]
public async Task CannotCreateWithSameName()
{
var newPreReceiveEnvironment = new NewPreReceiveEnvironment("default", "https://example.com/foo.zip");

View File

@@ -92,7 +92,7 @@ namespace Octokit.Tests.Integration.Clients
public async Task GetsInstallation()
{
var installationId = Helper.GitHubAppInstallationId;
var result = await _github.GitHubApps.GetInstallation(installationId);
Assert.True(result.AppId == Helper.GitHubAppId);

View File

@@ -621,7 +621,7 @@ public class SearchClientTests
public async Task SearchForAllLabelsUsingTermAndRepositoryId()
{
var request = new SearchLabelsRequest("category", 7528679);
var labels = await _gitHubClient.Search.SearchLabels(request);
Assert.NotEmpty(labels.Items);

View File

@@ -89,7 +89,7 @@ namespace Octokit.Tests.Integration
// return null, which will cause the [GitHubAppTest]'s to not be discovered
return null;
#endif
});
static readonly Lazy<Uri> _customUrl = new Lazy<Uri>(() =>

View File

@@ -166,7 +166,7 @@ public class ObservableEnterprisePreReceiveEnvironmentsClientTests
_preReceiveEnvironmentsClient = _githubEnterprise.Enterprise.PreReceiveEnvironment;
}
[Fact]
[GitHubEnterpriseTest]
public async Task CanCreatePreReceiveEnvironment()
{
PreReceiveEnvironment preReceiveEnvironment = null;
@@ -187,7 +187,7 @@ public class ObservableEnterprisePreReceiveEnvironmentsClientTests
}
}
[Fact]
[GitHubEnterpriseTest]
public async Task CannotCreateWithSameName()
{
var newPreReceiveEnvironment = new NewPreReceiveEnvironment("default", "https://example.com/foo.zip");

View File

@@ -88,7 +88,7 @@ namespace Octokit.Tests.Integration.Reactive
public class TheGetMethod
{
readonly ObservableReleasesClient _releaseClient;
public TheGetMethod()
{
var github = Helper.GetAuthenticatedClient();

View File

@@ -1042,7 +1042,7 @@ namespace Octokit.Tests.Clients
connection.Received()
.Get<IReadOnlyList<Team>>(
Arg.Is<Uri>(u => u.ToString() == "repos/owner/repo/branches/branch/protection/restrictions/teams"),
Arg.Is<Uri>(u => u.ToString() == "repos/owner/repo/branches/branch/protection/restrictions/teams"),
null,
"application/vnd.github.loki-preview+json,application/vnd.github.hellcat-preview+json");
}
@@ -1057,7 +1057,7 @@ namespace Octokit.Tests.Clients
connection.Received()
.Get<IReadOnlyList<Team>>(
Arg.Is<Uri>(u => u.ToString() == "repositories/1/branches/branch/protection/restrictions/teams"),
Arg.Is<Uri>(u => u.ToString() == "repositories/1/branches/branch/protection/restrictions/teams"),
null,
"application/vnd.github.loki-preview+json,application/vnd.github.hellcat-preview+json");
}
@@ -1094,8 +1094,8 @@ namespace Octokit.Tests.Clients
connection.Received()
.Put<IReadOnlyList<Team>>(
Arg.Is<Uri>(u => u.ToString() == "repos/owner/repo/branches/branch/protection/restrictions/teams"),
Arg.Any<IReadOnlyList<string>>(),
Arg.Is<Uri>(u => u.ToString() == "repos/owner/repo/branches/branch/protection/restrictions/teams"),
Arg.Any<IReadOnlyList<string>>(),
null,
"application/vnd.github.loki-preview+json,application/vnd.github.hellcat-preview+json");
}
@@ -1111,8 +1111,8 @@ namespace Octokit.Tests.Clients
connection.Received()
.Put<IReadOnlyList<Team>>(
Arg.Is<Uri>(u => u.ToString() == "repositories/1/branches/branch/protection/restrictions/teams"),
Arg.Any<IReadOnlyList<string>>(),
Arg.Is<Uri>(u => u.ToString() == "repositories/1/branches/branch/protection/restrictions/teams"),
Arg.Any<IReadOnlyList<string>>(),
null,
"application/vnd.github.loki-preview+json,application/vnd.github.hellcat-preview+json");
}
@@ -1152,7 +1152,7 @@ namespace Octokit.Tests.Clients
connection.Received()
.Post<IReadOnlyList<Team>>(
Arg.Is<Uri>(u => u.ToString() == "repos/owner/repo/branches/branch/protection/restrictions/teams"),
Arg.Is<Uri>(u => u.ToString() == "repos/owner/repo/branches/branch/protection/restrictions/teams"),
Arg.Any<IReadOnlyList<string>>(),
"application/vnd.github.loki-preview+json,application/vnd.github.hellcat-preview+json");
}
@@ -1168,7 +1168,7 @@ namespace Octokit.Tests.Clients
connection.Received()
.Post<IReadOnlyList<Team>>(
Arg.Is<Uri>(u => u.ToString() == "repositories/1/branches/branch/protection/restrictions/teams"),
Arg.Is<Uri>(u => u.ToString() == "repositories/1/branches/branch/protection/restrictions/teams"),
Arg.Any<IReadOnlyList<string>>(),
"application/vnd.github.loki-preview+json,application/vnd.github.hellcat-preview+json");
}
@@ -1208,7 +1208,7 @@ namespace Octokit.Tests.Clients
connection.Received()
.Delete<IReadOnlyList<Team>>(
Arg.Is<Uri>(u => u.ToString() == "repos/owner/repo/branches/branch/protection/restrictions/teams"),
Arg.Is<Uri>(u => u.ToString() == "repos/owner/repo/branches/branch/protection/restrictions/teams"),
Arg.Any<BranchProtectionTeamCollection>(),
"application/vnd.github.loki-preview+json,application/vnd.github.hellcat-preview+json");
}
@@ -1224,7 +1224,7 @@ namespace Octokit.Tests.Clients
connection.Received()
.Delete<IReadOnlyList<Team>>(
Arg.Is<Uri>(u => u.ToString() == "repositories/1/branches/branch/protection/restrictions/teams"),
Arg.Is<Uri>(u => u.ToString() == "repositories/1/branches/branch/protection/restrictions/teams"),
Arg.Any<IReadOnlyList<string>>(),
"application/vnd.github.loki-preview+json,application/vnd.github.hellcat-preview+json");
}

View File

@@ -1708,7 +1708,7 @@ namespace Octokit.Tests.Clients
connection.Received().Get<SearchLabelsResult>(
Arg.Is<Uri>(u => u.ToString() == "search/labels"),
Arg.Is<Dictionary<string, string>>(d =>
Arg.Is<Dictionary<string, string>>(d =>
d["q"] == "something" &&
d["repository_id"] == "1"),
"application/vnd.github.symmetra-preview+json");
@@ -1776,7 +1776,7 @@ namespace Octokit.Tests.Clients
connection.Received().Get<SearchLabelsResult>(
Arg.Is<Uri>(u => u.ToString() == "search/labels"),
Arg.Is<Dictionary<string, string>>(d =>
d["q"] == "something" &&
d["q"] == "something" &&
d["repository_id"] == "1"),
"application/vnd.github.symmetra-preview+json");
}

View File

@@ -3,7 +3,7 @@ using System.Globalization;
namespace Octokit.Internal
{
class BearerTokenAuthenticator: IAuthenticationHandler
class BearerTokenAuthenticator : IAuthenticationHandler
{
public void Authenticate(IRequest request, Credentials credentials)
{

View File

@@ -72,7 +72,7 @@ namespace Octokit
/// </summary>
[Parameter(Value = "created")]
Created,
/// <summary>
/// search by last updated
/// </summary>

View File

@@ -53,7 +53,7 @@ namespace Octokit
/// The type of the target (User or Organization)
/// </summary>
public StringEnum<AccountType> TargetType { get; protected set; }
/// <summary>
/// The Permissions granted to the Installation
/// </summary>

View File

@@ -25,7 +25,7 @@ namespace Octokit
OrganizationProjects = organizationProjects;
TeamDiscussions = teamDiscussions;
}
/// <summary>
/// Repository metadata
/// Search repositories, list collaborators, and access repository metadata.

View File

@@ -224,7 +224,7 @@ namespace Octokit
/// Whether maintainers of the base repository can push to the HEAD branch
/// </summary>
public bool? MaintainerCanModify { get; protected set; }
/// <summary>
/// Users requested for review
/// </summary>

View File

@@ -11,7 +11,7 @@ namespace Octokit
public class Verification
{
public Verification() { }
public Verification(bool verified, VerificationReason reason, string signature, string payload)
{
Verified = verified;

View File

@@ -1,3 +1,73 @@
### New in 0.30.0 (released 17/06/2018)
## Advisories and Breaking Changes
- Note that the `IssuesLabelsClient.RemoveFromIssue()` methods which previously had no return value, will now return an `IReadonlyList<Label>`. This change is source compatible but not binary compatible.
- The following `[Obsolete]` items have been removed from octokit, please use the indicated replacements:
Client Methods
- `OranizationsClient.GetAll()` => `GetAllForUser()`
- `PullRequestsClient.Comment` => `ReviewComment`
- `RepositoryBranchesClient.GetRequiredStatusChecksContexts()` => `GetAllRequiredStatusChecksContexts()`
- `RepositoryBranchesClient.GetProtectedBranchTeamRestrictions()` => `GetAllProtectedBranchTeamRestrictions()`
- `RepositoryBranchesClient.GetProtectedBranchUserRestrictions()` => `GetAllProtectedBranchUserRestrictions()`
- `RepositoryTrafficClient.GetReferrers()` => `GetAllReferrers()`
- `RepositoryTrafficClient.GetPaths()` => `GetAllPaths()`
- `TeamsClient.GetMembership()` => `GetMembershipDetails()`
- `TeamsClient.AddMembership()` => `AddOrEditMembership()`
- `TeamsClient.AddMembership()` => `AddOrEditMembership()`
Request Models
- Remove unwanted `ctor`'s from `BranchProtectionUpdateSettings` and `UpdateTeam`
- `NewIssue` `Assignee` => `Assignees`
- `IssueUpdate` `Assignee` => `Assignees`
Response Models
- `TeamMembership` => `TeamMembershipDetails`
## Release Notes
### Milestone: GitHub Apps
**Features/Enhancements**
- Add initial support for GitHub Apps, see [the documentation](http://octokitnet.readthedocs.io/en/latest/github-apps/) for further information - [#1738](https://github.com/octokit/octokit.net/pull/1738) via [@itaibh](https://github.com/itaibh), [@adriangodong](https://github.com/adriangodong), [@ryangribble](https://github.com/ryangribble)
### Milestone: None
**Features/Enhancements**
- Added `PreviousFileName` field to `PullRequestFile` response - [#1770](https://github.com/octokit/octokit.net/pull/1770) via [@Kaneraz](https://github.com/Kaneraz)
- Support `PullRequestReviewEvent` payloads using new response model `PullRequestReviewEventPayload` - [#1767](https://github.com/octokit/octokit.net/pull/1767) via [@Cyberboss](https://github.com/Cyberboss)
- Add the ability to search issues by milestones, using `SearchIssuesRequest.Milestone` - [#1788](https://github.com/octokit/octokit.net/pull/1788) via [@mkArtak](https://github.com/mkArtak)
- Add an overload to `IReleasesClient.Get()` that allows retrieving a `Release` by the associated tag - [#1793](https://github.com/octokit/octokit.net/pull/1793) via [@tasadar2](https://github.com/tasadar2), [@ryangribble](https://github.com/ryangribble)
- Add `MaintainerCanModify` field to `PullRequest` response and `NewPullRequest` and `UpdatePullRequest` requests - [#1771](https://github.com/octokit/octokit.net/pull/1771) via [@Cyberboss](https://github.com/Cyberboss), [@ryangribble](https://github.com/ryangribble)
- Enabled additional methods for preview "Nested Teams" support:
- `IRepositoriesClient.GetAllTeams()`
- `IRepositoryBranchesClient.GetAllProtectedBranchTeamRestrictions()`
- `IRepositoryBranchesClient.UpdateProtectedBranchTeamRestrictions()`
- `IRepositoryBranchesClient.AddProtectedBranchTeamRestrictions()`
- `IRepositoryBranchesClient.DeleteProtectedBranchTeamRestrictions()` - [#1795](https://github.com/octokit/octokit.net/pull/1795) via [@MikhailTymchukDX](https://github.com/MikhailTymchukDX), [@ryangribble](https://github.com/ryangribble)
- Implement [Pre Receive Environments API (Preview)](https://developer.github.com/enterprise/2.13/v3/enterprise/pre_receive_environments/) for GitHub Enterprise - [#1796](https://github.com/octokit/octokit.net/pull/1796) via [@tasadar2](https://github.com/tasadar2), [@ryangribble](https://github.com/ryangribble)
- Implement support for [Label API Improvements](https://developer.github.com/changes/2018-02-22-label-description-search-preview/), including additional fields (`Description` and `Default`), emoji support and searching for labels (`SearchClient.SearchLabels()`) - [#1802](https://github.com/octokit/octokit.net/pull/1802) via [@jozefizso](https://github.com/jozefizso), [@ryangribble](https://github.com/ryangribble)
**Housekeeping**
- Correct missing/incorrect XmlDoc entries for parameters on some methods - [#1779](https://github.com/octokit/octokit.net/pull/1779) via [@ryangribble](https://github.com/ryangribble)
- Parameter names in validation exception messages are now derived from the parameters themselves, rather than a literal string that was hopefully kept up to date - [#1781](https://github.com/octokit/octokit.net/pull/1781) via [@itaibh](https://github.com/itaibh)
- Update Octokit build tooling to use .NET SDK 2.x (note that this is only an SDK tooling update - `Octokit` and `Octokit.Reactive` libraries are still targeting `netstandard1.1`) - [#1784](https://github.com/octokit/octokit.net/pull/1784) via [@ryangribble](https://github.com/ryangribble)
- Removed a number of `[Obsolete]` methods, members and constructors inline with our standard deprecation schedule - [#1780](https://github.com/octokit/octokit.net/pull/1780) via [@ryangribble](https://github.com/ryangribble)
- Ensure all response models have appropriate `ctor`'s to allow mocking, and enforce with a convention test - [#1798](https://github.com/octokit/octokit.net/pull/1798) via [@tasadar2](https://github.com/tasadar2), [@ryangribble](https://github.com/ryangribble)
**Documentation Updates**
- Tidy up code formatting in docs/samples - [#1791](https://github.com/octokit/octokit.net/pull/1791) via [@txdv](https://github.com/txdv)
- Clarify the usage of `reference` parameter in `IReferencesClient` methods - [#1778](https://github.com/octokit/octokit.net/pull/1778) via [@Cyberboss](https://github.com/Cyberboss), [@ryangribble](https://github.com/ryangribble)
- Improved the "Upload Release Asset" doc sample - [#1805](https://github.com/octokit/octokit.net/pull/1805) via [@mungojam](https://github.com/mungojam)
- Fixed error in "Create Release" doc sample - [#1804](https://github.com/octokit/octokit.net/pull/1804) via [@mungojam](https://github.com/mungojam)
### New in 0.29.0 (released 19/02/2018)
## Advisories and Breaking Changes
@@ -63,6 +133,7 @@
- Correct rendering of `HttpClient` documentation page - [#1699](https://github.com/octokit/octokit.net/pull/1699) via [@scovetta](https://github.com/scovetta)
### New in 0.27.0 (released 7/10/2017)
## Advisories and Breaking Changes

View File

@@ -1,5 +1,7 @@
image: Visual Studio 2017
skip_branch_with_pr: true
init:
- git config --global core.autocrlf input

View File

@@ -113,7 +113,8 @@ if($LASTEXITCODE -ne 0) {
exit $LASTEXITCODE;
}
Write-Host "Running Cake.Frosting build runner..."
Invoke-Expression "dotnet run $Arguments"
Write-Host "dotnet run -- $Arguments"
Invoke-Expression "dotnet run -- $Arguments"
if($LASTEXITCODE -ne 0) {
Pop-Location;
exit $LASTEXITCODE;

View File

@@ -11,4 +11,5 @@ echo "Preparing Cake.Frosting build runner..."
dotnet restore
echo "Executing Cake.Frosting build runner..."
dotnet run "$@"
echo "dotnet run -- $@"
dotnet run -- "$@"

View File

@@ -6,7 +6,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Cake.Frosting" Version="0.1.0-alpha0071" />
<PackageReference Include="Cake.Frosting" Version="0.1.0-alpha0078" />
</ItemGroup>
</Project>