private void FormatCommentPayload(string title, BitbucketServerPayloadPullRequest payload) { _embed.Title = title; _embed.Author = ExtractAuthor(payload.Actor, payload.PullRequest.FromRef.Repository); _embed.Description = payload.Comment.Text; _embed.Url = ExtractPullRequestUrl(payload.PullRequest); }
private void FormatPrPayload(string title, BitbucketServerPayloadPullRequest payload) { _embed.Author = ExtractAuthor(payload.Actor, payload.PullRequest.FromRef.Repository); _embed.Title = $"**{title}**\n" + $"{payload.PullRequest.Title}\n" + $"PR-{payload.PullRequest.Id}"; _embed.Description = payload.PullRequest.Description; _embed.Url = ExtractPullRequestUrl(payload.PullRequest); _embed.Fields = ExtractPullRequestFields(payload.PullRequest); }
private void PrDeclined(BitbucketServerPayloadPullRequest payload) { FormatPrPayload("Pull Request declined", payload); AddEmbed(_embed); }
private void PrCommentDeleted(BitbucketServerPayloadPullRequest payload) { FormatCommentPayload("Deleted comment on Pull Request", payload); AddEmbed(_embed); }
private void PrReviewerNeedsWork(BitbucketServerPayloadPullRequest payload) { FormatPrPayload("Pull Request needs work", payload); AddEmbed(_embed); }
private void PrMerged(BitbucketServerPayloadPullRequest payload) { FormatPrPayload("Pull Request merged!", payload); AddEmbed(_embed); }
private void PrReviewerUnapproved(BitbucketServerPayloadPullRequest payload) { FormatPrPayload("Removed approval for Pull Request", payload); AddEmbed(_embed); }
private void PrReviewerApproved(BitbucketServerPayloadPullRequest payload) { FormatPrPayload("Pull Request approved!", payload); AddEmbed(_embed); }
private void PrReviewerUpdated(BitbucketServerPayloadPullRequest payload) { FormatPrPayload("New reviewer for Pull Request", payload); AddEmbed(_embed); }
private void PrModified(BitbucketServerPayloadPullRequest payload) { FormatPrPayload("Pull Request modified", payload); AddEmbed(_embed); }
private void PrFromRefUpdated(BitbucketServerPayloadPullRequest payload) { FormatPrPayload("Pull Request updated", payload); AddEmbed(_embed); }