From 066a19b8e48ee2ad62b789aea819438a5ca44d9f Mon Sep 17 00:00:00 2001 From: Mark Siedle Date: Mon, 1 Apr 2019 12:12:23 +1000 Subject: [PATCH 1/3] Adding project group support to subscriptions model --- source/Octopus.Client/Model/EventNotificationSubscription.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/source/Octopus.Client/Model/EventNotificationSubscription.cs b/source/Octopus.Client/Model/EventNotificationSubscription.cs index 885548b5c..317994e1c 100644 --- a/source/Octopus.Client/Model/EventNotificationSubscription.cs +++ b/source/Octopus.Client/Model/EventNotificationSubscription.cs @@ -47,6 +47,7 @@ public EventNotificationSubscriptionFilter() { this.Users = new List(); this.Projects = new List(); + this.ProjectGroups = new List(); this.Environments = new List(); this.EventGroups = new List(); this.EventCategories = new List(); @@ -58,6 +59,7 @@ public EventNotificationSubscriptionFilter() public IList Users { get; set; } public IList Projects { get; set; } + public IList ProjectGroups { get; set; } public IList Environments { get; set; } public IList EventGroups { get; set; } public IList EventCategories { get; set; } From ffb2f8640d2474b7161c5e2169e89cdc46e0cb49 Mon Sep 17 00:00:00 2001 From: Mark Siedle Date: Mon, 1 Apr 2019 12:28:02 +1000 Subject: [PATCH 2/3] Updating surface area tests --- ...re.ThePublicSurfaceAreaShouldNotRegress..NETCore.approved.txt | 1 + ...ePublicSurfaceAreaShouldNotRegress..NETFramework.approved.txt | 1 + 2 files changed, 2 insertions(+) diff --git a/source/Octopus.Client.Tests/PublicSurfaceAreaFixture.ThePublicSurfaceAreaShouldNotRegress..NETCore.approved.txt b/source/Octopus.Client.Tests/PublicSurfaceAreaFixture.ThePublicSurfaceAreaShouldNotRegress..NETCore.approved.txt index f19912561..cf30b5359 100644 --- a/source/Octopus.Client.Tests/PublicSurfaceAreaFixture.ThePublicSurfaceAreaShouldNotRegress..NETCore.approved.txt +++ b/source/Octopus.Client.Tests/PublicSurfaceAreaFixture.ThePublicSurfaceAreaShouldNotRegress..NETCore.approved.txt @@ -2493,6 +2493,7 @@ Octopus.Client.Model IList EventAgents { get; set; } IList EventCategories { get; set; } IList EventGroups { get; set; } + IList ProjectGroups { get; set; } IList Projects { get; set; } IList Tags { get; set; } IList Tenants { get; set; } diff --git a/source/Octopus.Client.Tests/PublicSurfaceAreaFixture.ThePublicSurfaceAreaShouldNotRegress..NETFramework.approved.txt b/source/Octopus.Client.Tests/PublicSurfaceAreaFixture.ThePublicSurfaceAreaShouldNotRegress..NETFramework.approved.txt index 9dd440f98..cf4aafd61 100644 --- a/source/Octopus.Client.Tests/PublicSurfaceAreaFixture.ThePublicSurfaceAreaShouldNotRegress..NETFramework.approved.txt +++ b/source/Octopus.Client.Tests/PublicSurfaceAreaFixture.ThePublicSurfaceAreaShouldNotRegress..NETFramework.approved.txt @@ -2506,6 +2506,7 @@ Octopus.Client.Model IList EventAgents { get; set; } IList EventCategories { get; set; } IList EventGroups { get; set; } + IList ProjectGroups { get; set; } IList Projects { get; set; } IList Tags { get; set; } IList Tenants { get; set; } From 016201d99c398bdfc30bd22925942b594b432df9 Mon Sep 17 00:00:00 2001 From: Mark Siedle Date: Mon, 1 Apr 2019 12:36:45 +1000 Subject: [PATCH 3/3] Adding project group to event filters --- ...icSurfaceAreaShouldNotRegress..NETCore.approved.txt | 4 ++-- ...faceAreaShouldNotRegress..NETFramework.approved.txt | 4 ++-- .../Repositories/Async/EventRepository.cs | 10 +++++++--- source/Octopus.Client/Repositories/EventRepository.cs | 10 +++++++--- 4 files changed, 18 insertions(+), 10 deletions(-) diff --git a/source/Octopus.Client.Tests/PublicSurfaceAreaFixture.ThePublicSurfaceAreaShouldNotRegress..NETCore.approved.txt b/source/Octopus.Client.Tests/PublicSurfaceAreaFixture.ThePublicSurfaceAreaShouldNotRegress..NETCore.approved.txt index cf30b5359..be6d7e314 100644 --- a/source/Octopus.Client.Tests/PublicSurfaceAreaFixture.ThePublicSurfaceAreaShouldNotRegress..NETCore.approved.txt +++ b/source/Octopus.Client.Tests/PublicSurfaceAreaFixture.ThePublicSurfaceAreaShouldNotRegress..NETCore.approved.txt @@ -5698,7 +5698,7 @@ Octopus.Client.Repositories Octopus.Client.Repositories.ICanExtendSpaceContext { Octopus.Client.Model.ResourceCollection List(Int32, String, String, Boolean) - Octopus.Client.Model.ResourceCollection List(Int32, Nullable, String, String, String, String, Boolean, String, String, String, String, String, String, String, String, Nullable, Nullable, String, String) + Octopus.Client.Model.ResourceCollection List(Int32, Nullable, String, String, String, String, Boolean, String, String, String, String, String, String, String, String, Nullable, Nullable, String, String, String) } interface IFeaturesConfigurationRepository { @@ -6277,7 +6277,7 @@ Octopus.Client.Repositories.Async Octopus.Client.Repositories.Async.ICanExtendSpaceContext { Task> List(Int32, String, String, Boolean) - Task> List(Int32, Nullable, String, String, String, String, Boolean, String, String, String, String, String, String, String, String, Nullable, Nullable, String, String) + Task> List(Int32, Nullable, String, String, String, String, Boolean, String, String, String, String, String, String, String, String, Nullable, Nullable, String, String, String) } interface IFeaturesConfigurationRepository { diff --git a/source/Octopus.Client.Tests/PublicSurfaceAreaFixture.ThePublicSurfaceAreaShouldNotRegress..NETFramework.approved.txt b/source/Octopus.Client.Tests/PublicSurfaceAreaFixture.ThePublicSurfaceAreaShouldNotRegress..NETFramework.approved.txt index cf4aafd61..320cb42ac 100644 --- a/source/Octopus.Client.Tests/PublicSurfaceAreaFixture.ThePublicSurfaceAreaShouldNotRegress..NETFramework.approved.txt +++ b/source/Octopus.Client.Tests/PublicSurfaceAreaFixture.ThePublicSurfaceAreaShouldNotRegress..NETFramework.approved.txt @@ -5720,7 +5720,7 @@ Octopus.Client.Repositories Octopus.Client.Repositories.ICanExtendSpaceContext { Octopus.Client.Model.ResourceCollection List(Int32, String, String, Boolean) - Octopus.Client.Model.ResourceCollection List(Int32, Nullable, String, String, String, String, Boolean, String, String, String, String, String, String, String, String, Nullable, Nullable, String, String) + Octopus.Client.Model.ResourceCollection List(Int32, Nullable, String, String, String, String, Boolean, String, String, String, String, String, String, String, String, Nullable, Nullable, String, String, String) } interface IFeaturesConfigurationRepository { @@ -6299,7 +6299,7 @@ Octopus.Client.Repositories.Async Octopus.Client.Repositories.Async.ICanExtendSpaceContext { Task> List(Int32, String, String, Boolean) - Task> List(Int32, Nullable, String, String, String, String, Boolean, String, String, String, String, String, String, String, String, Nullable, Nullable, String, String) + Task> List(Int32, Nullable, String, String, String, String, Boolean, String, String, String, String, String, String, String, String, Nullable, Nullable, String, String, String) } interface IFeaturesConfigurationRepository { diff --git a/source/Octopus.Client/Repositories/Async/EventRepository.cs b/source/Octopus.Client/Repositories/Async/EventRepository.cs index b455eb248..7c1ab45c3 100644 --- a/source/Octopus.Client/Repositories/Async/EventRepository.cs +++ b/source/Octopus.Client/Repositories/Async/EventRepository.cs @@ -36,6 +36,7 @@ Task> List(int skip = 0, /// /// /// + /// /// Task> List(int skip = 0, int? take = null, @@ -55,7 +56,8 @@ Task> List(int skip = 0, long? fromAutoId = null, long? toAutoId = null, string documentTypes = null, - string eventAgents = null); + string eventAgents = null, + string projectGroups = null); } class EventRepository : MixedScopeBaseRepository, IEventRepository @@ -103,7 +105,8 @@ public async Task> List(int skip = 0, long? fromAutoId = null, long? toAutoId = null, string documentTypes = null, - string eventAgents = null) + string eventAgents = null, + string projectGroups = null) { var parameters = ParameterHelper.CombineParameters(GetAdditionalQueryParameters(), new { @@ -125,7 +128,8 @@ public async Task> List(int skip = 0, fromAutoId, toAutoId, documentTypes, - eventAgents + eventAgents, + projectGroups, }); return await Client.List(await Repository.Link("Events").ConfigureAwait(false), parameters).ConfigureAwait(false); diff --git a/source/Octopus.Client/Repositories/EventRepository.cs b/source/Octopus.Client/Repositories/EventRepository.cs index 415e12e04..d115e6d00 100644 --- a/source/Octopus.Client/Repositories/EventRepository.cs +++ b/source/Octopus.Client/Repositories/EventRepository.cs @@ -35,6 +35,7 @@ ResourceCollection List(int skip = 0, /// /// /// + /// /// ResourceCollection List(int skip = 0, int? take = null, @@ -54,7 +55,8 @@ ResourceCollection List(int skip = 0, long? fromAutoId = null, long? toAutoId = null, string documentTypes = null, - string eventAgents = null); + string eventAgents = null, + string projectGroups = null); } class EventRepository : MixedScopeBaseRepository, IEventRepository @@ -102,7 +104,8 @@ public ResourceCollection List(int skip = 0, long? fromAutoId = null, long? toAutoId = null, string documentTypes = null, - string eventAgents = null) + string eventAgents = null, + string projectGroups = null) { var parameters = ParameterHelper.CombineParameters(AdditionalQueryParameters, new { @@ -124,7 +127,8 @@ public ResourceCollection List(int skip = 0, fromAutoId, toAutoId, documentTypes, - eventAgents + eventAgents, + projectGroups, }); return Client.List(Repository.Link("Events"), parameters); }