예제 #1
0
        /// <inheritdoc/>
        public async Task CloseOrReopen(ICommentViewModel comment)
        {
            var address = HostAddress.Create(Repository.CloneUrl);

            if (State == PullRequestState.Open)
            {
                await service.CloseIssueish(
                    address,
                    Repository.Owner,
                    Repository.Name,
                    Number).ConfigureAwait(true);

                State = PullRequestState.Closed;
            }
            else
            {
                await service.ReopenIssueish(
                    address,
                    Repository.Owner,
                    Repository.Name,
                    Number).ConfigureAwait(true);

                State = PullRequestState.Open;
            }
        }