private void BtnApproveClick(object sender, EventArgs e) { var curItem = lbxPullRequests.SelectedItem as PullRequest; var mergeInfo = new MergeRequestInfo { Id = curItem.Id, Version = curItem.Version, ProjectKey = curItem.DestProjectKey, TargetRepo = curItem.DestRepo, }; //Approve var approveRequest = new ApprovePullRequest(_settings, mergeInfo); var response = approveRequest.Send(); if (response.Success) { MessageBox.Show(_success.Text); StashViewPullRequestFormLoad(null, null); } else { MessageBox.Show(string.Join(Environment.NewLine, response.Messages), _error.Text, MessageBoxButtons.OK, MessageBoxIcon.Error); } }
public MergePullRequest(Settings settings, MergeRequestInfo info) : base(settings) { _info = info; }