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); } }
public CreatePullRequestRequest(Settings settings, PullRequestInfo info) : base(settings) { _info = info; }