diff --git a/NGitLab.Mock.Tests/GroupsMockTests.cs b/NGitLab.Mock.Tests/GroupsMockTests.cs index 79f41c0c..3f358306 100644 --- a/NGitLab.Mock.Tests/GroupsMockTests.cs +++ b/NGitLab.Mock.Tests/GroupsMockTests.cs @@ -1,6 +1,8 @@ -using System.Linq; +using System; +using System.Linq; using System.Threading.Tasks; using NGitLab.Mock.Config; +using NGitLab.Models; using NUnit.Framework; namespace NGitLab.Mock.Tests; @@ -339,4 +341,69 @@ public async Task Test_page_projects_in_subgroup_with_descendants() Assert.That(total, Is.EqualTo(3)); }); } + + [Test] + public void Test_create_update_delete_group_hooks() + { + // Arrange + var groupId = 1; + + using var server = new GitLabConfig() + .WithUser("user1", isAdmin: true) + .WithGroup("group1", groupId) + .BuildServer(); + + var client = server.CreateClient("user1"); + var groupHooksClient = client.GetGroupHooksClient(groupId); + + var toCreateGroupHook = new GroupHookUpsert + { + Url = new Uri("https://test-create-group-hook.com"), + EnableSslVerification = true, + PushEvents = true, + }; + + // Act + var createdGroupHook = groupHooksClient.Create(toCreateGroupHook); + + // Assert + Assert.That(groupHooksClient.All.ToArray(), Has.Length.EqualTo(1)); + + Assert.That(createdGroupHook.Url, Is.EqualTo(toCreateGroupHook.Url)); + Assert.That(createdGroupHook.EnableSslVerification, Is.EqualTo(toCreateGroupHook.EnableSslVerification)); + Assert.That(createdGroupHook.PushEvents, Is.EqualTo(toCreateGroupHook.PushEvents)); + + var groupHookById = groupHooksClient[createdGroupHook.Id]; + Assert.That(groupHookById.Url, Is.EqualTo(toCreateGroupHook.Url)); + Assert.That(groupHookById.EnableSslVerification, Is.EqualTo(toCreateGroupHook.EnableSslVerification)); + Assert.That(groupHookById.PushEvents, Is.EqualTo(toCreateGroupHook.PushEvents)); + + // Arrange + var toUpdateGroupHook = new GroupHookUpsert + { + Url = new Uri("https://test-update-group-hook.com"), + PushEvents = false, + }; + + // Act + var updatedGroupHook = groupHooksClient.Update(createdGroupHook.Id, toUpdateGroupHook); + + // Assert + Assert.That(groupHooksClient.All.ToArray(), Has.Length.EqualTo(1)); + + Assert.That(updatedGroupHook.Url, Is.EqualTo(toUpdateGroupHook.Url)); + Assert.That(updatedGroupHook.PushEvents, Is.EqualTo(toUpdateGroupHook.PushEvents)); + Assert.That(updatedGroupHook.EnableSslVerification, Is.False); + + groupHookById = groupHooksClient[updatedGroupHook.Id]; + Assert.That(groupHookById.Url, Is.EqualTo(toUpdateGroupHook.Url)); + Assert.That(groupHookById.PushEvents, Is.EqualTo(toUpdateGroupHook.PushEvents)); + Assert.That(groupHookById.EnableSslVerification, Is.False); + + // Act + groupHooksClient.Delete(updatedGroupHook.Id); + + // Assert + Assert.That(groupHooksClient.All.ToArray(), Is.Empty); + } } diff --git a/NGitLab.Mock/Clients/GitLabClient.cs b/NGitLab.Mock/Clients/GitLabClient.cs index e3005015..abc38aba 100644 --- a/NGitLab.Mock/Clients/GitLabClient.cs +++ b/NGitLab.Mock/Clients/GitLabClient.cs @@ -154,4 +154,6 @@ public IProtectedTagClient GetProtectedTagClient(ProjectId projectId) public ISearchClient GetProjectSearchClient(int projectId) => GetProjectSearchClient((long)projectId); public ISearchClient GetProjectSearchClient(ProjectId projectId) => new ProjectSearchClient(Context, projectId); + + public IGroupHooksClient GetGroupHooksClient(GroupId groupId) => new GroupHooksClient(Context, groupId); } diff --git a/NGitLab.Mock/Clients/GroupHooksClient.cs b/NGitLab.Mock/Clients/GroupHooksClient.cs new file mode 100644 index 00000000..4d2e52b3 --- /dev/null +++ b/NGitLab.Mock/Clients/GroupHooksClient.cs @@ -0,0 +1,109 @@ +using System.Collections.Generic; +using System.Linq; +using NGitLab.Models; + +namespace NGitLab.Mock.Clients; + +internal sealed class GroupHooksClient : ClientBase, IGroupHooksClient +{ + public int _groupId { get; } + + public GroupHooksClient(ClientContext context, GroupId groupId) + : base(context) + { + _groupId = Server.AllGroups.FindGroup(groupId.ValueAsUriParameter()).Id; + } + + public IEnumerable All + { + get + { + using (Context.BeginOperationScope()) + { + var hooks = GetGroup(_groupId, GroupPermission.Edit).Hooks; + return ToClientGroupHooks(hooks).ToList(); + } + } + } + + public Models.GroupHook this[int hookId] + { + get + { + using (Context.BeginOperationScope()) + { + var hook = All.FirstOrDefault(h => h.Id == hookId) ?? throw new GitLabNotFoundException(); + return hook; + } + } + } + + public Models.GroupHook Create(GroupHookUpsert hook) + { + using (Context.BeginOperationScope()) + { + var groupHook = UpsertToHook(hook); + + GetGroup(_groupId, GroupPermission.Edit).Hooks.Add(groupHook); + return groupHook.ToClientGroupHook(); + } + } + + public Models.GroupHook Update(int hookId, GroupHookUpsert hook) + { + using (Context.BeginOperationScope()) + { + var currentHook = GetGroup(_groupId, GroupPermission.Edit).Hooks.FirstOrDefault(h => h.Id == hookId) ?? throw new GitLabNotFoundException(); + + currentHook.Url = hook.Url; + currentHook.PushEvents = hook.PushEvents ?? false; + currentHook.MergeRequestsEvents = hook.MergeRequestsEvents ?? false; + currentHook.IssuesEvents = hook.IssuesEvents ?? false; + currentHook.TagPushEvents = hook.TagPushEvents ?? false; + currentHook.NoteEvents = hook.NoteEvents ?? false; + currentHook.JobEvents = hook.JobEvents ?? false; + currentHook.PipelineEvents = hook.PipelineEvents ?? false; + currentHook.WikiPagesEvents = hook.WikiPagesEvents ?? false; + currentHook.EnableSslVerification = hook.EnableSslVerification ?? false; + currentHook.Token = currentHook.Token; + + return currentHook.ToClientGroupHook(); + } + } + + public void Delete(int hookId) + { + using (Context.BeginOperationScope()) + { + var groupHooks = GetGroup(_groupId, GroupPermission.Edit).Hooks; + var hook = groupHooks.FirstOrDefault(h => h.Id == hookId) ?? throw new GitLabNotFoundException(); + + groupHooks.Remove(hook); + } + } + + private static IEnumerable ToClientGroupHooks(IEnumerable hooks) + { + return hooks.Select(hook => hook.ToClientGroupHook()); + } + + private static GroupHook UpsertToHook(GroupHookUpsert hook) + { + var hookFromUpsert = new GroupHook + { + Url = hook.Url, + PushEvents = hook.PushEvents ?? false, + MergeRequestsEvents = hook.MergeRequestsEvents ?? false, + IssuesEvents = hook.IssuesEvents ?? false, + TagPushEvents = hook.TagPushEvents ?? false, + NoteEvents = hook.NoteEvents ?? false, + JobEvents = hook.JobEvents ?? false, + PipelineEvents = hook.PipelineEvents ?? false, + WikiPagesEvents = hook.WikiPagesEvents ?? false, + EnableSslVerification = hook.EnableSslVerification ?? false, + Token = hook.Token, + }; + + return hookFromUpsert; + } +} diff --git a/NGitLab.Mock/Group.cs b/NGitLab.Mock/Group.cs index 3fb2d139..b8c39db7 100644 --- a/NGitLab.Mock/Group.cs +++ b/NGitLab.Mock/Group.cs @@ -23,6 +23,7 @@ public Group(string name) Badges = new BadgeCollection(this); Labels = new LabelsCollection(this); Milestones = new MilestoneCollection(this); + Hooks = new GroupHookCollection(this); Name = name; } @@ -76,6 +77,8 @@ public string Name public MilestoneCollection Milestones { get; } + public GroupHookCollection Hooks { get; } + public IEnumerable MergeRequests => AllProjects.SelectMany(project => project.MergeRequests); public string Path diff --git a/NGitLab.Mock/GroupHook.cs b/NGitLab.Mock/GroupHook.cs new file mode 100644 index 00000000..6f318de6 --- /dev/null +++ b/NGitLab.Mock/GroupHook.cs @@ -0,0 +1,55 @@ +using System; + +namespace NGitLab.Mock; + +public sealed class GroupHook : GitLabObject +{ + public new Group Parent => (Group)base.Parent; + + public int Id { get; internal set; } + + public Uri Url { get; set; } + + public DateTime CreatedAt { get; set; } + + public bool PushEvents { get; set; } + + public bool MergeRequestsEvents { get; set; } + + public bool IssuesEvents { get; set; } + + public bool TagPushEvents { get; set; } + + public bool NoteEvents { get; set; } + + public bool JobEvents { get; set; } + + public bool PipelineEvents { get; set; } + + public bool WikiPagesEvents { get; set; } + + public bool EnableSslVerification { get; set; } + + public string Token { get; set; } + + public Models.GroupHook ToClientGroupHook() + { + return new Models.GroupHook + { + Id = Id, + Url = Url, + GroupId = Parent.Id, + CreatedAt = CreatedAt, + PushEvents = PushEvents, + MergeRequestsEvents = MergeRequestsEvents, + IssuesEvents = IssuesEvents, + TagPushEvents = TagPushEvents, + NoteEvents = NoteEvents, + JobEvents = JobEvents, + PipelineEvents = PipelineEvents, + WikiPagesEvents = WikiPagesEvents, + EnableSslVerification = EnableSslVerification, + Token = Token, + }; + } +} diff --git a/NGitLab.Mock/GroupHookCollection.cs b/NGitLab.Mock/GroupHookCollection.cs new file mode 100644 index 00000000..92b60884 --- /dev/null +++ b/NGitLab.Mock/GroupHookCollection.cs @@ -0,0 +1,30 @@ +using System; +using System.Linq; + +namespace NGitLab.Mock; + +public class GroupHookCollection : Collection +{ + public GroupHookCollection(GitLabObject container) + : base(container) + { + } + + public override void Add(GroupHook item) + { + if (item is null) + throw new ArgumentNullException(nameof(item)); + + if (item.Id == default) + { + item.Id = GetNewId(); + } + + base.Add(item); + } + + private int GetNewId() + { + return this.Select(hook => hook.Id).DefaultIfEmpty().Max() + 1; + } +} diff --git a/NGitLab.Mock/PublicAPI.Unshipped.txt b/NGitLab.Mock/PublicAPI.Unshipped.txt index cbea08fa..668f5da8 100644 --- a/NGitLab.Mock/PublicAPI.Unshipped.txt +++ b/NGitLab.Mock/PublicAPI.Unshipped.txt @@ -449,6 +449,7 @@ NGitLab.Mock.Group.Group() -> void NGitLab.Mock.Group.Group(NGitLab.Mock.User user) -> void NGitLab.Mock.Group.Group(string name) -> void NGitLab.Mock.Group.Groups.get -> NGitLab.Mock.GroupCollection +NGitLab.Mock.Group.Hooks.get -> NGitLab.Mock.GroupHookCollection NGitLab.Mock.Group.Id.get -> int NGitLab.Mock.Group.Id.set -> void NGitLab.Mock.Group.IsUserNamespace.get -> bool @@ -476,6 +477,37 @@ NGitLab.Mock.Group.Visibility.set -> void NGitLab.Mock.GroupCollection NGitLab.Mock.GroupCollection.GroupCollection(NGitLab.Mock.GitLabObject container) -> void NGitLab.Mock.GroupExtensions +NGitLab.Mock.GroupHook +NGitLab.Mock.GroupHook.CreatedAt.get -> System.DateTime +NGitLab.Mock.GroupHook.CreatedAt.set -> void +NGitLab.Mock.GroupHook.EnableSslVerification.get -> bool +NGitLab.Mock.GroupHook.EnableSslVerification.set -> void +NGitLab.Mock.GroupHook.GroupHook() -> void +NGitLab.Mock.GroupHook.Id.get -> int +NGitLab.Mock.GroupHook.IssuesEvents.get -> bool +NGitLab.Mock.GroupHook.IssuesEvents.set -> void +NGitLab.Mock.GroupHook.JobEvents.get -> bool +NGitLab.Mock.GroupHook.JobEvents.set -> void +NGitLab.Mock.GroupHook.MergeRequestsEvents.get -> bool +NGitLab.Mock.GroupHook.MergeRequestsEvents.set -> void +NGitLab.Mock.GroupHook.NoteEvents.get -> bool +NGitLab.Mock.GroupHook.NoteEvents.set -> void +NGitLab.Mock.GroupHook.Parent.get -> NGitLab.Mock.Group +NGitLab.Mock.GroupHook.PipelineEvents.get -> bool +NGitLab.Mock.GroupHook.PipelineEvents.set -> void +NGitLab.Mock.GroupHook.PushEvents.get -> bool +NGitLab.Mock.GroupHook.PushEvents.set -> void +NGitLab.Mock.GroupHook.TagPushEvents.get -> bool +NGitLab.Mock.GroupHook.TagPushEvents.set -> void +NGitLab.Mock.GroupHook.ToClientGroupHook() -> NGitLab.Models.GroupHook +NGitLab.Mock.GroupHook.Token.get -> string +NGitLab.Mock.GroupHook.Token.set -> void +NGitLab.Mock.GroupHook.Url.get -> System.Uri +NGitLab.Mock.GroupHook.Url.set -> void +NGitLab.Mock.GroupHook.WikiPagesEvents.get -> bool +NGitLab.Mock.GroupHook.WikiPagesEvents.set -> void +NGitLab.Mock.GroupHookCollection +NGitLab.Mock.GroupHookCollection.GroupHookCollection(NGitLab.Mock.GitLabObject container) -> void NGitLab.Mock.Issue NGitLab.Mock.Issue.Assignee.get -> NGitLab.Mock.UserRef NGitLab.Mock.Issue.Assignee.set -> void @@ -1193,6 +1225,7 @@ override NGitLab.Mock.EventCollection.Add(NGitLab.Mock.Event item) -> void override NGitLab.Mock.Config.GitLabCollection.InsertItem(int index, TItem item) -> void override NGitLab.Mock.Config.GitLabCollection.SetItem(int index, TItem item) -> void override NGitLab.Mock.GroupCollection.Add(NGitLab.Mock.Group group) -> void +override NGitLab.Mock.GroupHookCollection.Add(NGitLab.Mock.GroupHook item) -> void override NGitLab.Mock.IssueCollection.Add(NGitLab.Mock.Issue item) -> void override NGitLab.Mock.JobCollection.Add(NGitLab.Mock.Job job) -> void override NGitLab.Mock.LabelsCollection.Add(NGitLab.Mock.Label label) -> void diff --git a/NGitLab.Tests/GroupHooksClientTests.cs b/NGitLab.Tests/GroupHooksClientTests.cs new file mode 100644 index 00000000..5ecd29cf --- /dev/null +++ b/NGitLab.Tests/GroupHooksClientTests.cs @@ -0,0 +1,71 @@ +using System; +using System.Linq; +using System.Threading.Tasks; +using NGitLab.Models; +using NGitLab.Tests.Docker; +using NUnit.Framework; + +namespace NGitLab.Tests; + +public class GroupHooksClientTests +{ + [Test] + [NGitLabRetry] + public async Task Test_create_update_delete_group_hook() + { + // Arrange + using var context = await GitLabTestContext.CreateAsync(); + var group = context.CreateGroup(); + var groupHooksClient = context.Client.GetGroupHooksClient(group.Id); + + var toCreateGroupHook = new GroupHookUpsert + { + Url = new Uri("https://test-create-group-hook.com"), + EnableSslVerification = true, + PushEvents = true, + }; + + // Act + var createdGroupHook = groupHooksClient.Create(toCreateGroupHook); + + // Assert + Assert.That(groupHooksClient.All.ToArray(), Has.Length.EqualTo(1)); + + Assert.That(createdGroupHook.Url, Is.EqualTo(toCreateGroupHook.Url)); + Assert.That(createdGroupHook.EnableSslVerification, Is.EqualTo(toCreateGroupHook.EnableSslVerification)); + Assert.That(createdGroupHook.PushEvents, Is.EqualTo(toCreateGroupHook.PushEvents)); + + var groupHookById = groupHooksClient[createdGroupHook.Id]; + Assert.That(groupHookById.Url, Is.EqualTo(toCreateGroupHook.Url)); + Assert.That(groupHookById.EnableSslVerification, Is.EqualTo(toCreateGroupHook.EnableSslVerification)); + Assert.That(groupHookById.PushEvents, Is.EqualTo(toCreateGroupHook.PushEvents)); + + // Arrange + var toUpdateGroupHook = new GroupHookUpsert + { + Url = new Uri("https://test-update-group-hook.com"), + PushEvents = false, + }; + + // Act + var updatedGroupHook = groupHooksClient.Update(createdGroupHook.Id, toUpdateGroupHook); + + // Assert + Assert.That(groupHooksClient.All.ToArray(), Has.Length.EqualTo(1)); + + Assert.That(updatedGroupHook.Url, Is.EqualTo(toUpdateGroupHook.Url)); + Assert.That(updatedGroupHook.PushEvents, Is.EqualTo(toUpdateGroupHook.PushEvents)); + Assert.That(updatedGroupHook.EnableSslVerification, Is.EqualTo(toCreateGroupHook.EnableSslVerification)); + + groupHookById = groupHooksClient[updatedGroupHook.Id]; + Assert.That(groupHookById.Url, Is.EqualTo(toUpdateGroupHook.Url)); + Assert.That(groupHookById.PushEvents, Is.EqualTo(toUpdateGroupHook.PushEvents)); + Assert.That(groupHookById.EnableSslVerification, Is.EqualTo(toCreateGroupHook.EnableSslVerification)); + + // Act + groupHooksClient.Delete(updatedGroupHook.Id); + + // Assert + Assert.That(groupHooksClient.All.ToArray(), Is.Empty); + } +} diff --git a/NGitLab/GitLabClient.cs b/NGitLab/GitLabClient.cs index 962a8a57..98d2bf53 100644 --- a/NGitLab/GitLabClient.cs +++ b/NGitLab/GitLabClient.cs @@ -251,4 +251,7 @@ public ISearchClient GetProjectSearchClient(int projectId) public ISearchClient GetProjectSearchClient(ProjectId projectId) => new SearchClient(_api, $"/projects/{projectId.ValueAsUriParameter()}/search"); + + public IGroupHooksClient GetGroupHooksClient(GroupId groupId) + => new GroupHooksClient(_api, groupId); } diff --git a/NGitLab/IGitLabClient.cs b/NGitLab/IGitLabClient.cs index f12c7274..cbe9075e 100644 --- a/NGitLab/IGitLabClient.cs +++ b/NGitLab/IGitLabClient.cs @@ -175,4 +175,6 @@ public interface IGitLabClient public ISearchClient GetProjectSearchClient(int projectId); public ISearchClient GetProjectSearchClient(ProjectId projectId); + + public IGroupHooksClient GetGroupHooksClient(GroupId groupId); } diff --git a/NGitLab/IGroupHooksClient.cs b/NGitLab/IGroupHooksClient.cs new file mode 100644 index 00000000..1bedf782 --- /dev/null +++ b/NGitLab/IGroupHooksClient.cs @@ -0,0 +1,17 @@ +using System.Collections.Generic; +using NGitLab.Models; + +namespace NGitLab; + +public interface IGroupHooksClient +{ + IEnumerable All { get; } + + GroupHook this[int hookId] { get; } + + GroupHook Create(GroupHookUpsert hook); + + GroupHook Update(int hookId, GroupHookUpsert hook); + + void Delete(int hookId); +} diff --git a/NGitLab/Impl/GroupHooksClient.cs b/NGitLab/Impl/GroupHooksClient.cs new file mode 100644 index 00000000..4ffd65cb --- /dev/null +++ b/NGitLab/Impl/GroupHooksClient.cs @@ -0,0 +1,30 @@ +using System.Collections.Generic; +using NGitLab.Extensions; +using NGitLab.Models; + +namespace NGitLab.Impl; + +public class GroupHooksClient : IGroupHooksClient +{ + private readonly API _api; + private readonly string _path; + + public GroupHooksClient(API api, GroupId groupId) + { + _api = api; + _path = $"{Group.Url}/{groupId.ValueAsUriParameter()}/hooks"; + } + + public IEnumerable All => _api.Get().GetAll(_path); + + public GroupHook this[int hookId] => _api.Get().To(_path + "/" + hookId.ToStringInvariant()); + + public GroupHook Create(GroupHookUpsert hook) => _api.Post().With(hook).To(_path); + + public GroupHook Update(int hookId, GroupHookUpsert hook) => _api.Put().With(hook).To(_path + "/" + hookId.ToStringInvariant()); + + public void Delete(int hookId) + { + _api.Delete().Execute(_path + "/" + hookId.ToStringInvariant()); + } +} diff --git a/NGitLab/Models/GroupHook.cs b/NGitLab/Models/GroupHook.cs new file mode 100644 index 00000000..5b1b6a0a --- /dev/null +++ b/NGitLab/Models/GroupHook.cs @@ -0,0 +1,49 @@ +using System; +using System.Text.Json.Serialization; + +namespace NGitLab.Models; + +public class GroupHook +{ + [JsonPropertyName("id")] + public int Id { get; set; } + + [JsonPropertyName("url")] + public Uri Url { get; set; } + + [JsonPropertyName("group_id")] + public int GroupId { get; set; } + + [JsonPropertyName("created_at")] + public DateTime CreatedAt { get; set; } + + [JsonPropertyName("push_events")] + public bool PushEvents { get; set; } + + [JsonPropertyName("merge_requests_events")] + public bool MergeRequestsEvents { get; set; } + + [JsonPropertyName("issues_events")] + public bool IssuesEvents { get; set; } + + [JsonPropertyName("tag_push_events")] + public bool TagPushEvents { get; set; } + + [JsonPropertyName("note_events")] + public bool NoteEvents { get; set; } + + [JsonPropertyName("job_events")] + public bool JobEvents { get; set; } + + [JsonPropertyName("pipeline_events")] + public bool PipelineEvents { get; set; } + + [JsonPropertyName("wiki_page_events")] + public bool WikiPagesEvents { get; set; } + + [JsonPropertyName("enable_ssl_verification")] + public bool EnableSslVerification { get; set; } + + [JsonPropertyName("token")] + public string Token { get; set; } +} diff --git a/NGitLab/Models/GroupHookUpsert.cs b/NGitLab/Models/GroupHookUpsert.cs new file mode 100644 index 00000000..a242e814 --- /dev/null +++ b/NGitLab/Models/GroupHookUpsert.cs @@ -0,0 +1,42 @@ +using System; +using System.ComponentModel.DataAnnotations; +using System.Text.Json.Serialization; + +namespace NGitLab.Models; + +public class GroupHookUpsert +{ + [Required] + [JsonPropertyName("url")] + public Uri Url { get; set; } + + [JsonPropertyName("push_events")] + public bool? PushEvents { get; set; } + + [JsonPropertyName("merge_requests_events")] + public bool? MergeRequestsEvents { get; set; } + + [JsonPropertyName("issues_events")] + public bool? IssuesEvents { get; set; } + + [JsonPropertyName("tag_push_events")] + public bool? TagPushEvents { get; set; } + + [JsonPropertyName("note_events")] + public bool? NoteEvents { get; set; } + + [JsonPropertyName("job_events")] + public bool? JobEvents { get; set; } + + [JsonPropertyName("pipeline_events")] + public bool? PipelineEvents { get; set; } + + [JsonPropertyName("wiki_page_events")] + public bool? WikiPagesEvents { get; set; } + + [JsonPropertyName("enable_ssl_verification")] + public bool? EnableSslVerification { get; set; } + + [JsonPropertyName("token")] + public string Token { get; set; } +} diff --git a/NGitLab/PublicAPI.Unshipped.txt b/NGitLab/PublicAPI.Unshipped.txt index d1f8634f..a987013c 100644 --- a/NGitLab/PublicAPI.Unshipped.txt +++ b/NGitLab/PublicAPI.Unshipped.txt @@ -58,6 +58,7 @@ NGitLab.GitLabClient.GetEnvironmentClient(NGitLab.Models.ProjectId projectId) -> NGitLab.GitLabClient.GetEvents() -> NGitLab.IEventClient NGitLab.GitLabClient.GetGroupBadgeClient(int groupId) -> NGitLab.IGroupBadgeClient NGitLab.GitLabClient.GetGroupBadgeClient(NGitLab.Models.GroupId groupId) -> NGitLab.IGroupBadgeClient +NGitLab.GitLabClient.GetGroupHooksClient(NGitLab.Models.GroupId groupId) -> NGitLab.IGroupHooksClient NGitLab.GitLabClient.GetGroupMergeRequest(NGitLab.Models.GroupId groupId) -> NGitLab.IMergeRequestClient NGitLab.GitLabClient.GetGroupMilestone(int groupId) -> NGitLab.IMilestoneClient NGitLab.GitLabClient.GetGroupMilestone(NGitLab.Models.GroupId groupId) -> NGitLab.IMilestoneClient @@ -200,6 +201,7 @@ NGitLab.IGitLabClient.GetEnvironmentClient(NGitLab.Models.ProjectId projectId) - NGitLab.IGitLabClient.GetEvents() -> NGitLab.IEventClient NGitLab.IGitLabClient.GetGroupBadgeClient(int groupId) -> NGitLab.IGroupBadgeClient NGitLab.IGitLabClient.GetGroupBadgeClient(NGitLab.Models.GroupId groupId) -> NGitLab.IGroupBadgeClient +NGitLab.IGitLabClient.GetGroupHooksClient(NGitLab.Models.GroupId groupId) -> NGitLab.IGroupHooksClient NGitLab.IGitLabClient.GetGroupMergeRequest(NGitLab.Models.GroupId groupId) -> NGitLab.IMergeRequestClient NGitLab.IGitLabClient.GetGroupMilestone(int groupId) -> NGitLab.IMilestoneClient NGitLab.IGitLabClient.GetGroupMilestone(NGitLab.Models.GroupId groupId) -> NGitLab.IMilestoneClient @@ -264,6 +266,12 @@ NGitLab.IGroupBadgeClient.Create(NGitLab.Models.BadgeCreate badge) -> NGitLab.Mo NGitLab.IGroupBadgeClient.Delete(int id) -> void NGitLab.IGroupBadgeClient.this[int id].get -> NGitLab.Models.Badge NGitLab.IGroupBadgeClient.Update(int id, NGitLab.Models.BadgeUpdate badge) -> NGitLab.Models.Badge +NGitLab.IGroupHooksClient +NGitLab.IGroupHooksClient.All.get -> System.Collections.Generic.IEnumerable +NGitLab.IGroupHooksClient.Create(NGitLab.Models.GroupHookUpsert hook) -> NGitLab.Models.GroupHook +NGitLab.IGroupHooksClient.Delete(int hookId) -> void +NGitLab.IGroupHooksClient.this[int hookId].get -> NGitLab.Models.GroupHook +NGitLab.IGroupHooksClient.Update(int hookId, NGitLab.Models.GroupHookUpsert hook) -> NGitLab.Models.GroupHook NGitLab.IGroupsClient NGitLab.IGroupsClient.Accessible.get -> System.Collections.Generic.IEnumerable NGitLab.IGroupsClient.Create(NGitLab.Models.GroupCreate group) -> NGitLab.Models.Group @@ -560,6 +568,13 @@ NGitLab.Impl.GitLabCredentials.Password.get -> string NGitLab.Impl.GitLabCredentials.Password.set -> void NGitLab.Impl.GitLabCredentials.UserName.get -> string NGitLab.Impl.GitLabCredentials.UserName.set -> void +NGitLab.Impl.GroupHooksClient +NGitLab.Impl.GroupHooksClient.All.get -> System.Collections.Generic.IEnumerable +NGitLab.Impl.GroupHooksClient.Create(NGitLab.Models.GroupHookUpsert hook) -> NGitLab.Models.GroupHook +NGitLab.Impl.GroupHooksClient.Delete(int hookId) -> void +NGitLab.Impl.GroupHooksClient.GroupHooksClient(NGitLab.Impl.API api, NGitLab.Models.GroupId groupId) -> void +NGitLab.Impl.GroupHooksClient.this[int hookId].get -> NGitLab.Models.GroupHook +NGitLab.Impl.GroupHooksClient.Update(int hookId, NGitLab.Models.GroupHookUpsert hook) -> NGitLab.Models.GroupHook NGitLab.Impl.GroupsClient NGitLab.Impl.GroupsClient.Accessible.get -> System.Collections.Generic.IEnumerable NGitLab.Impl.GroupsClient.Create(NGitLab.Models.GroupCreate group) -> NGitLab.Models.Group @@ -1868,6 +1883,60 @@ NGitLab.Models.GroupCreate.RequestAccessEnabled -> bool NGitLab.Models.GroupCreate.SharedRunnersMinutesLimit.get -> int? NGitLab.Models.GroupCreate.SharedRunnersMinutesLimit.set -> void NGitLab.Models.GroupCreate.Visibility -> NGitLab.Models.VisibilityLevel +NGitLab.Models.GroupHook +NGitLab.Models.GroupHook.CreatedAt.get -> System.DateTime +NGitLab.Models.GroupHook.CreatedAt.set -> void +NGitLab.Models.GroupHook.EnableSslVerification.get -> bool +NGitLab.Models.GroupHook.EnableSslVerification.set -> void +NGitLab.Models.GroupHook.GroupHook() -> void +NGitLab.Models.GroupHook.GroupId.get -> int +NGitLab.Models.GroupHook.GroupId.set -> void +NGitLab.Models.GroupHook.Id.get -> int +NGitLab.Models.GroupHook.Id.set -> void +NGitLab.Models.GroupHook.IssuesEvents.get -> bool +NGitLab.Models.GroupHook.IssuesEvents.set -> void +NGitLab.Models.GroupHook.JobEvents.get -> bool +NGitLab.Models.GroupHook.JobEvents.set -> void +NGitLab.Models.GroupHook.MergeRequestsEvents.get -> bool +NGitLab.Models.GroupHook.MergeRequestsEvents.set -> void +NGitLab.Models.GroupHook.NoteEvents.get -> bool +NGitLab.Models.GroupHook.NoteEvents.set -> void +NGitLab.Models.GroupHook.PipelineEvents.get -> bool +NGitLab.Models.GroupHook.PipelineEvents.set -> void +NGitLab.Models.GroupHook.PushEvents.get -> bool +NGitLab.Models.GroupHook.PushEvents.set -> void +NGitLab.Models.GroupHook.TagPushEvents.get -> bool +NGitLab.Models.GroupHook.TagPushEvents.set -> void +NGitLab.Models.GroupHook.Token.get -> string +NGitLab.Models.GroupHook.Token.set -> void +NGitLab.Models.GroupHook.Url.get -> System.Uri +NGitLab.Models.GroupHook.Url.set -> void +NGitLab.Models.GroupHook.WikiPagesEvents.get -> bool +NGitLab.Models.GroupHook.WikiPagesEvents.set -> void +NGitLab.Models.GroupHookUpsert +NGitLab.Models.GroupHookUpsert.EnableSslVerification.get -> bool? +NGitLab.Models.GroupHookUpsert.EnableSslVerification.set -> void +NGitLab.Models.GroupHookUpsert.GroupHookUpsert() -> void +NGitLab.Models.GroupHookUpsert.IssuesEvents.get -> bool? +NGitLab.Models.GroupHookUpsert.IssuesEvents.set -> void +NGitLab.Models.GroupHookUpsert.JobEvents.get -> bool? +NGitLab.Models.GroupHookUpsert.JobEvents.set -> void +NGitLab.Models.GroupHookUpsert.MergeRequestsEvents.get -> bool? +NGitLab.Models.GroupHookUpsert.MergeRequestsEvents.set -> void +NGitLab.Models.GroupHookUpsert.NoteEvents.get -> bool? +NGitLab.Models.GroupHookUpsert.NoteEvents.set -> void +NGitLab.Models.GroupHookUpsert.PipelineEvents.get -> bool? +NGitLab.Models.GroupHookUpsert.PipelineEvents.set -> void +NGitLab.Models.GroupHookUpsert.PushEvents.get -> bool? +NGitLab.Models.GroupHookUpsert.PushEvents.set -> void +NGitLab.Models.GroupHookUpsert.TagPushEvents.get -> bool? +NGitLab.Models.GroupHookUpsert.TagPushEvents.set -> void +NGitLab.Models.GroupHookUpsert.Token.get -> string +NGitLab.Models.GroupHookUpsert.Token.set -> void +NGitLab.Models.GroupHookUpsert.Url.get -> System.Uri +NGitLab.Models.GroupHookUpsert.Url.set -> void +NGitLab.Models.GroupHookUpsert.WikiPagesEvents.get -> bool? +NGitLab.Models.GroupHookUpsert.WikiPagesEvents.set -> void NGitLab.Models.GroupId NGitLab.Models.GroupId.Equals(NGitLab.Models.Group other) -> bool NGitLab.Models.GroupId.Equals(NGitLab.Models.GroupId other) -> bool