policy-bot
policy-bot copied to clipboard
Feature: Include PR Body in Approval Candidates
This adds a solution for https://github.com/palantir/policy-bot/issues/417.
As discussed in the attached issue, this adds support for reading the PR Body for approval patterns.
It also invalidates a current approval if the body is edited, if the user has ignore_edited_body in their policy options list.
Let me know if this looks okay. Especially curious if there are other better ways to have tested this implementation. Thank you again for considering this!
@bluekeyes thanks for your speedy feedback! I have implemented some changes. Let me knokw what you think.
we also want to add something like this to the rule Trigger method here, so that updates will automatically reflect on the PR instead of having to check the details page to trigger all:
if len(m.BodyPatterns) > 0 {
t |= common.TriggerPullRequest
}
Thanks for the feedback @devinburnette and @bluekeyes - I've finally made the changes. Sorry for the delay, was on a long holiday.
this lgtm