@@ -1176,13 +1176,13 @@ pub fn validate_update_pr_votes(front_matter: &FrontMatter) -> Result<()> {
11761176 Ok ( ( ) )
11771177}
11781178
1179- /// Validate that resolve-pr-review- thread has a required `allowed-statuses` field when configured.
1179+ /// Validate that resolve-pr-thread has a required `allowed-statuses` field when configured.
11801180///
11811181/// An empty or missing `allowed-statuses` list would let agents set any thread status,
11821182/// including "fixed" or "wontFix" on security-critical review threads. Operators must
11831183/// explicitly opt in to each allowed status transition.
11841184pub fn validate_resolve_pr_thread_statuses ( front_matter : & FrontMatter ) -> Result < ( ) > {
1185- if let Some ( config_value) = front_matter. safe_outputs . get ( "resolve-pr-review- thread" ) {
1185+ if let Some ( config_value) = front_matter. safe_outputs . get ( "resolve-pr-thread" ) {
11861186 if let Some ( obj) = config_value. as_object ( ) {
11871187 let allowed_statuses = obj. get ( "allowed-statuses" ) ;
11881188 let is_empty = match allowed_statuses {
@@ -1191,19 +1191,19 @@ pub fn validate_resolve_pr_thread_statuses(front_matter: &FrontMatter) -> Result
11911191 } ;
11921192 if is_empty {
11931193 anyhow:: bail!(
1194- "safe-outputs.resolve-pr-review- thread requires a non-empty \
1194+ "safe-outputs.resolve-pr-thread requires a non-empty \
11951195 'allowed-statuses' list to prevent agents from manipulating thread \
11961196 statuses without explicit operator consent. Example:\n \n \
1197- safe-outputs:\n resolve-pr-review- thread:\n allowed-statuses:\n \
1197+ safe-outputs:\n resolve-pr-thread:\n allowed-statuses:\n \
11981198 \x20 - fixed\n \n \
11991199 Valid statuses: active, fixed, wont-fix, closed, by-design\n "
12001200 ) ;
12011201 }
12021202 } else {
12031203 anyhow:: bail!(
1204- "safe-outputs.resolve-pr-review- thread must be a configuration object \
1204+ "safe-outputs.resolve-pr-thread must be a configuration object \
12051205 with an 'allowed-statuses' list. Example:\n \n \
1206- safe-outputs:\n resolve-pr-review- thread:\n allowed-statuses:\n \
1206+ safe-outputs:\n resolve-pr-thread:\n allowed-statuses:\n \
12071207 \x20 - fixed\n "
12081208 ) ;
12091209 }
@@ -2854,7 +2854,7 @@ mod tests {
28542854 #[ test]
28552855 fn test_resolve_pr_thread_fails_when_allowed_statuses_missing ( ) {
28562856 let ( fm, _) = parse_markdown (
2857- "---\n name: test\n description: test\n safe-outputs:\n resolve-pr-review- thread:\n allowed-repositories:\n - self\n ---\n "
2857+ "---\n name: test\n description: test\n safe-outputs:\n resolve-pr-thread:\n allowed-repositories:\n - self\n ---\n "
28582858 ) . unwrap ( ) ;
28592859 let result = validate_resolve_pr_thread_statuses ( & fm) ;
28602860 assert ! ( result. is_err( ) ) ;
@@ -2865,7 +2865,7 @@ mod tests {
28652865 #[ test]
28662866 fn test_resolve_pr_thread_fails_when_allowed_statuses_empty ( ) {
28672867 let ( fm, _) = parse_markdown (
2868- "---\n name: test\n description: test\n safe-outputs:\n resolve-pr-review- thread:\n allowed-statuses: []\n ---\n "
2868+ "---\n name: test\n description: test\n safe-outputs:\n resolve-pr-thread:\n allowed-statuses: []\n ---\n "
28692869 ) . unwrap ( ) ;
28702870 let result = validate_resolve_pr_thread_statuses ( & fm) ;
28712871 assert ! ( result. is_err( ) ) ;
@@ -2876,7 +2876,7 @@ mod tests {
28762876 #[ test]
28772877 fn test_resolve_pr_thread_fails_when_value_is_scalar ( ) {
28782878 let ( fm, _) = parse_markdown (
2879- "---\n name: test\n description: test\n safe-outputs:\n resolve-pr-review- thread: true\n ---\n "
2879+ "---\n name: test\n description: test\n safe-outputs:\n resolve-pr-thread: true\n ---\n "
28802880 ) . unwrap ( ) ;
28812881 let result = validate_resolve_pr_thread_statuses ( & fm) ;
28822882 assert ! ( result. is_err( ) ) ;
@@ -2885,7 +2885,7 @@ mod tests {
28852885 #[ test]
28862886 fn test_resolve_pr_thread_passes_when_statuses_provided ( ) {
28872887 let ( fm, _) = parse_markdown (
2888- "---\n name: test\n description: test\n safe-outputs:\n resolve-pr-review- thread:\n allowed-statuses:\n - fixed\n - wont-fix\n ---\n "
2888+ "---\n name: test\n description: test\n safe-outputs:\n resolve-pr-thread:\n allowed-statuses:\n - fixed\n - wont-fix\n ---\n "
28892889 ) . unwrap ( ) ;
28902890 assert ! ( validate_resolve_pr_thread_statuses( & fm) . is_ok( ) ) ;
28912891 }
0 commit comments