feat(auto-review) policy config (#18959)

## Summary
Allow users to customize their own auto-review policy config.

## Testing
- [x] added config_tests
This commit is contained in:
Dylan Hurd
2026-04-22 10:33:02 -07:00
committed by GitHub
parent f67383bcba
commit 78593d72ea
4 changed files with 156 additions and 9 deletions

View File

@@ -90,6 +90,10 @@ pub struct ConfigToml {
/// ARC.
pub approvals_reviewer: Option<ApprovalsReviewer>,
/// Optional policy instructions for the guardian auto-reviewer.
#[serde(default)]
pub auto_review: Option<AutoReviewToml>,
#[serde(default)]
pub shell_environment_policy: ShellEnvironmentPolicyToml,
@@ -401,6 +405,12 @@ pub struct ConfigToml {
pub oss_provider: Option<String>,
}
#[derive(Serialize, Deserialize, Debug, Clone, Default, PartialEq, Eq, JsonSchema)]
pub struct AutoReviewToml {
/// Additional policy instructions inserted into the guardian prompt.
pub policy: Option<String>,
}
impl From<ConfigToml> for UserSavedConfig {
fn from(config_toml: ConfigToml) -> Self {
let profiles = config_toml