private void BtnCreateClick(object sender, EventArgs e) { var info = new PullRequestInfo { Title = txtTitle.Text, Description = txtDescription.Text, SourceBranch = txtSourceBranch.Text, TargetBranch = txtTargetBranch.Text, SourceRepo = (Repository) ddlRepositorySource.SelectedValue, TargetRepo = (Repository) ddlRepositoryTarget.SelectedValue, Reviewers = _reviewers }; var pullRequest = new CreatePullRequestRequest(_settings, info); var response = pullRequest.Send(); if (response.Success) MessageBox.Show("Success"); else MessageBox.Show(string.Join(Environment.NewLine, response.Messages), "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); }
private void BtnCreateClick(object sender, EventArgs e) { var info = new PullRequestInfo { Title = txtTitle.Text, Description = txtDescription.Text, SourceBranch = ddlBranchSource.SelectedValue.ToString(), TargetBranch = ddlBranchTarget.SelectedValue.ToString(), SourceRepo = (Repository)ddlRepositorySource.SelectedValue, TargetRepo = (Repository)ddlRepositoryTarget.SelectedValue, Reviewers = _reviewers }; var pullRequest = new CreatePullRequestRequest(_settings, info); var response = pullRequest.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); }