A GitHub App that enforces approval policies on pull requests
Full Changelog: https://github.com/palantir/policy-bot/compare/v1.27.1...v1.27.2
Full Changelog: https://github.com/palantir/policy-bot/compare/v1.27.0...v1.27.1
The new allow_non_author_contributor
option allows approvals from contributors who are not the PR author. This avoids confusing behavior with the existing options, where allow_contributor
also allows self-approval by the PR author. Contributed by @devinburnette.
repository
predicate (#461)The repository
predicate allows enabling rules based on the repository that contains the pull request. This makes it easier to share policies between multiple repositories that may have slightly different rules. Contributed by @devinburnette.
The body_patterns
approval method looks for matches in the pull request body, counting them as approvals from the PR author. In situations where self-approval is required, it may be more convenient to provide this when opening the PR instead of as a separate comment. Body approvals respect the existing ignore_edited_comments
option. Contributed by @agirlnamedsophia.
Policy Bot now attempts to dismiss stale GitHub reviews when they no longer apply to any rules. This can happen in several situations:
invalidate_on_push
is true and a new commit is pushedignore_edited_comments
is true and a review was editedgithub_review_comment_patterns
is set and a review does not match any of the patternsContributed by @devinburnette.
Full Changelog: https://github.com/palantir/policy-bot/compare/v1.26.0...v1.27.0
Matched approval method defaults to documentation specifications so that when 'github_review' or 'comments' is specified, it doesn't interfere with the default value of the non-specified attribute.
Full Changelog: https://github.com/palantir/policy-bot/compare/v1.25.0...v1.26.0
Each rule in the UI now has an expandable "Details" section that includes information about why a rule was selected or skipped as well as details about the users, teams, or organizations required to approve the rule. This makes it easier to understand why certain approval is required and who needs to approve without having to find and read the policy YAML file. Contributed by @yiweny.
Full Changelog: https://github.com/palantir/policy-bot/compare/v1.24.0...v1.25.0
Set the ignore_edited_comments
option on a rule to exclude all modified comments from influencing the rule state. This may be useful in environments with certain compliance requirements. Contributed by @devinburnette.
Set the github_review_comment_patterns
approval method to require that reviews contain specific text in addition to having the correct type. This allows rules to distinguish between approving reviews that fulfill different purposes. Contributed by @devinburnette.
Policy Bot now posts a successful status check on the default branch of a repository when installed. This makes it possible to immediately require the policy-bot
status check in the protected branch UI. Contributed by @devinburnette.
comment_patterns
option (#365)issue_comment
events (#379)Full Changelog: https://github.com/palantir/policy-bot/compare/v1.23.3...v1.24.0
Refactor configuration loading to use the go-githubapp/appconfig
package. This mostly adds support for shared organization policies (in the .github
repository by default), but should also make error messages more accurate.
It also changes the policy link in the details view to point to the resolved policy, instead of the local policy file.