mirror of
https://github.com/openai/codex.git
synced 2026-05-05 13:51:29 +03:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user