public GetMergeRequest ( NGitLab.Models.Project project, int id ) : NGitLab.Models.MergeRequest | ||
project | NGitLab.Models.Project | |
id | int | |
리턴 | NGitLab.Models.MergeRequest |
static void ProcessMergeRequestHook(GitLabWrapper gitLabWrapper, string serviceUser, MergeRequestHookClient hook, bool supportSendingMessages, string farmTaskName) { Log.Message($"Merge hook title: {hook.Attributes.Description}"); Log.Message($"Merge hook state: {hook.Attributes.State}"); var targetProject = gitLabWrapper.GetProject(hook.Attributes.TargetProjectId); var mergeRequest = gitLabWrapper.GetMergeRequest(targetProject, hook.Attributes.Id); if (supportSendingMessages) SendMessage(serviceUser, hook.Json, farmTaskName); if (!IsOpenedState(hook)) return; Log.Message($"Merge hook action: {hook.Attributes.Action}"); Log.Message($"Merge hook merge status: {hook.Attributes.MergeStatus}"); Log.Message($"Merge hook author: {gitLabWrapper.GetUser(hook.Attributes.AuthorId).Name}."); Log.Message($"Merge hook target branch: {hook.Attributes.TargetBranch}."); Log.Message($"Merge hook sourceBranch branch: {hook.Attributes.SourceBranch}."); if (ShouldForceSyncTask(mergeRequest, hook)) { ForceSyncBuild(gitLabWrapper, mergeRequest, targetProject, hook); return; } }