Skip to content

Commit

Permalink
Merge pull request #404 from OctopusDeploy/enh-subscriptionProjectGroups
Browse files Browse the repository at this point in the history
Supporting subscription project groups
  • Loading branch information
MarkSiedle authored Apr 1, 2019
2 parents fe2fa64 + 016201d commit 67128da
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2493,6 +2493,7 @@ Octopus.Client.Model
IList<String> EventAgents { get; set; }
IList<String> EventCategories { get; set; }
IList<String> EventGroups { get; set; }
IList<String> ProjectGroups { get; set; }
IList<String> Projects { get; set; }
IList<String> Tags { get; set; }
IList<String> Tenants { get; set; }
Expand Down Expand Up @@ -5697,7 +5698,7 @@ Octopus.Client.Repositories
Octopus.Client.Repositories.ICanExtendSpaceContext<IEventRepository>
{
Octopus.Client.Model.ResourceCollection<EventResource> List(Int32, String, String, Boolean)
Octopus.Client.Model.ResourceCollection<EventResource> List(Int32, Nullable<Int32>, String, String, String, String, Boolean, String, String, String, String, String, String, String, String, Nullable<Int64>, Nullable<Int64>, String, String)
Octopus.Client.Model.ResourceCollection<EventResource> List(Int32, Nullable<Int32>, String, String, String, String, Boolean, String, String, String, String, String, String, String, String, Nullable<Int64>, Nullable<Int64>, String, String, String)
}
interface IFeaturesConfigurationRepository
{
Expand Down Expand Up @@ -6276,7 +6277,7 @@ Octopus.Client.Repositories.Async
Octopus.Client.Repositories.Async.ICanExtendSpaceContext<IEventRepository>
{
Task<ResourceCollection<EventResource>> List(Int32, String, String, Boolean)
Task<ResourceCollection<EventResource>> List(Int32, Nullable<Int32>, String, String, String, String, Boolean, String, String, String, String, String, String, String, String, Nullable<Int64>, Nullable<Int64>, String, String)
Task<ResourceCollection<EventResource>> List(Int32, Nullable<Int32>, String, String, String, String, Boolean, String, String, String, String, String, String, String, String, Nullable<Int64>, Nullable<Int64>, String, String, String)
}
interface IFeaturesConfigurationRepository
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2506,6 +2506,7 @@ Octopus.Client.Model
IList<String> EventAgents { get; set; }
IList<String> EventCategories { get; set; }
IList<String> EventGroups { get; set; }
IList<String> ProjectGroups { get; set; }
IList<String> Projects { get; set; }
IList<String> Tags { get; set; }
IList<String> Tenants { get; set; }
Expand Down Expand Up @@ -5719,7 +5720,7 @@ Octopus.Client.Repositories
Octopus.Client.Repositories.ICanExtendSpaceContext<IEventRepository>
{
Octopus.Client.Model.ResourceCollection<EventResource> List(Int32, String, String, Boolean)
Octopus.Client.Model.ResourceCollection<EventResource> List(Int32, Nullable<Int32>, String, String, String, String, Boolean, String, String, String, String, String, String, String, String, Nullable<Int64>, Nullable<Int64>, String, String)
Octopus.Client.Model.ResourceCollection<EventResource> List(Int32, Nullable<Int32>, String, String, String, String, Boolean, String, String, String, String, String, String, String, String, Nullable<Int64>, Nullable<Int64>, String, String, String)
}
interface IFeaturesConfigurationRepository
{
Expand Down Expand Up @@ -6298,7 +6299,7 @@ Octopus.Client.Repositories.Async
Octopus.Client.Repositories.Async.ICanExtendSpaceContext<IEventRepository>
{
Task<ResourceCollection<EventResource>> List(Int32, String, String, Boolean)
Task<ResourceCollection<EventResource>> List(Int32, Nullable<Int32>, String, String, String, String, Boolean, String, String, String, String, String, String, String, String, Nullable<Int64>, Nullable<Int64>, String, String)
Task<ResourceCollection<EventResource>> List(Int32, Nullable<Int32>, String, String, String, String, Boolean, String, String, String, String, String, String, String, String, Nullable<Int64>, Nullable<Int64>, String, String, String)
}
interface IFeaturesConfigurationRepository
{
Expand Down
2 changes: 2 additions & 0 deletions source/Octopus.Client/Model/EventNotificationSubscription.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ public EventNotificationSubscriptionFilter()
{
this.Users = new List<string>();
this.Projects = new List<string>();
this.ProjectGroups = new List<string>();
this.Environments = new List<string>();
this.EventGroups = new List<string>();
this.EventCategories = new List<string>();
Expand All @@ -58,6 +59,7 @@ public EventNotificationSubscriptionFilter()

public IList<string> Users { get; set; }
public IList<string> Projects { get; set; }
public IList<string> ProjectGroups { get; set; }
public IList<string> Environments { get; set; }
public IList<string> EventGroups { get; set; }
public IList<string> EventCategories { get; set; }
Expand Down
10 changes: 7 additions & 3 deletions source/Octopus.Client/Repositories/Async/EventRepository.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ Task<ResourceCollection<EventResource>> List(int skip = 0,
/// <param name="toAutoId"></param>
/// <param name="documentTypes"></param>
/// <param name="eventAgents"></param>
/// <param name="projectGroups"></param>
/// <returns></returns>
Task<ResourceCollection<EventResource>> List(int skip = 0,
int? take = null,
Expand All @@ -55,7 +56,8 @@ Task<ResourceCollection<EventResource>> 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<EventResource>, IEventRepository
Expand Down Expand Up @@ -103,7 +105,8 @@ public async Task<ResourceCollection<EventResource>> 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
{
Expand All @@ -125,7 +128,8 @@ public async Task<ResourceCollection<EventResource>> List(int skip = 0,
fromAutoId,
toAutoId,
documentTypes,
eventAgents
eventAgents,
projectGroups,
});

return await Client.List<EventResource>(await Repository.Link("Events").ConfigureAwait(false), parameters).ConfigureAwait(false);
Expand Down
10 changes: 7 additions & 3 deletions source/Octopus.Client/Repositories/EventRepository.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ ResourceCollection<EventResource> List(int skip = 0,
/// <param name="toAutoId"></param>
/// <param name="documentTypes"></param>
/// <param name="eventAgents"></param>
/// <param name="projectGroups"></param>
/// <returns></returns>
ResourceCollection<EventResource> List(int skip = 0,
int? take = null,
Expand All @@ -54,7 +55,8 @@ ResourceCollection<EventResource> 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<EventResource>, IEventRepository
Expand Down Expand Up @@ -102,7 +104,8 @@ public ResourceCollection<EventResource> 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
{
Expand All @@ -124,7 +127,8 @@ public ResourceCollection<EventResource> List(int skip = 0,
fromAutoId,
toAutoId,
documentTypes,
eventAgents
eventAgents,
projectGroups,
});
return Client.List<EventResource>(Repository.Link("Events"), parameters);
}
Expand Down

0 comments on commit 67128da

Please sign in to comment.