Tags: DepickereSven/policy-bot
Tags
Fix overflow on detail elements with long paths (palantir#414) Prevent file path wrapping and add a horizontal scroll bar if the modified files or source patterns are long. Eventually, we should relax the maximum width on rule blocks to reduce the need for this, but for now, this is better than text breaking out of the container.
Fix panic on edit events in issue_comment handler (palantir#379) For an unknown reason, GitHub Enterprise 3.2.7 is not including the 'changes' field in the issue_comment payloads for edited comments. This causes the handler to panic when it tries to access the previous body of the comment. This field is still included on GitHub.com, so hopefully it will be fixed in some future release. For now, fix the panic by using the "safe" accessors, but at the cost of not actually auditing the edit correctly. Hard failing if the old body is missing will break a lot of legitimate workflows, particularly our internal changelog generation app. A quick survey of the API suggests you can only look up comment history using the GraphQL API, and it gives you a diff instead of the previous content. I'm not sure if the edit auditing functionality is important enough to justify a fallback if the payload is missing fields. Now that the 'ignore_edited_comments' property exists, users who really care about this should probably use that instead.
Update validate endpoint to check local and remote policies (palantir… …#329) * Update validate endpoint to check local and remote policies * Use appconfig remote ref for validation * Validate remote policies before local policies * Fix check issues * Simplify the remote policy validation Co-authored-by: James Toyer <jamestoyer@gmail.com>
Skip reviewer assignment on comment/review events (palantir#307) With the current set of predicates, these events can never change the set of requested reviewers or trigger a re-request so there's no reason to do the work of computing and assigning reviewers. This is an alternate solution to the re-request loops that I fixed by including head commit reviews in the set of reviewers. I think the other approach is more correct, but this doesn't hurt. The main downside is that if we add predicates that use comments or reviews in the future, it will be easy to forget to change this trigger condition and it might be a while before someone reports unexpected behavior with the new predicate and reviewer assignment.
Fix re-request loop for user reviewers (palantir#302) If a user was requested for review, but their review didn't change the status of the policy for some reason, policy-bot could immediately re-request them as a reviewer. This was most likely to happen if a user left a "request changes" review on a repository that does not have a disapproval policy. To fix this, look at all reviews on the current commit and exclude their authors from the list of requests. If the pull request is updated in the future, the users become eligible for requesting again. Because we already list reviews for basic policy evaluation, this shouldn't add any new requests.
Use Actions for CI and publishing (palantir#279) Also updates to Go 1.16 as part of switching build environments.
Avoid updating state on closed PRs (palantir#270) * Reorders title/author references to match * Adds ability to access PR state * Adds check for PR state in postStatus method * Implements State in pulltest * Adds State to github test * Replaces State() with IsOpen and IsClosed * Replace open check IsOpen check * Removes State getter
PreviousNext