policy-bot icon indicating copy to clipboard operation
policy-bot copied to clipboard

Add a simulate page

Open ashmeer7 opened this issue 2 years ago • 4 comments

This allows a user to:

  • Input a branch that has a policy file. The simulate page will evaluate that policy file on the given PR
  • In put a user to simulate a fake approval for. The simulate page will evaluate the PR as if the user had submitted an approval
  • Or both!

Abstracted away the majority of functionality into a BaseDetails handler. This allows consumers to submit a policy and a user to override the defaults done by the Details handler. The Details page still exists since it currently sends the information back to GitHub.

Here is a sample of the simulate page on a test repository: Screen Shot 2022-07-28 at 6 30 14 PM

ashmeer7 avatar Jul 29 '22 00:07 ashmeer7

Could you add a screenshot of what the simulate form and the button look like to the PR description?

bluekeyes avatar Jul 29 '22 00:07 bluekeyes

#476 is going to conflict with this, but it should make it much easier to evaluate a PR without posting status checks.

bluekeyes avatar Sep 26 '22 21:09 bluekeyes

Addressed some PR comments and fixed what I could fix without getting a whole test setup. I'll be back with more questions soon enough.

ashmeer7 avatar Sep 30 '22 00:09 ashmeer7

@bluekeyes this came up when deploying Policy-Bot. Could we get this merged? Use case was simply trying to test out a new policy on a branch, and not knowing the right path to do so.

elliot-graebert-skydio avatar Aug 12 '23 20:08 elliot-graebert-skydio