refactor(search): rename --after/--updated-after to --since/--updated-since
The --since naming is more intuitive (matches git log --since) and consistent with the list commands which already use --since. Renames the CLI flags, SearchCliFilters fields, SearchFilters fields, autocorrect registry, and robot-docs manifest. No behavioral change. Affected paths: - cli/mod.rs: SearchArgs field + clap attribute rename - cli/commands/search.rs: SearchCliFilters + run_search plumbing - search/filters.rs: SearchFilters struct + apply_filters logic - main.rs: handle_search + robot-docs JSON - cli/autocorrect.rs: COMMAND_FLAGS entry for search Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -16,8 +16,8 @@ pub struct SearchFilters {
|
||||
pub source_type: Option<SourceType>,
|
||||
pub author: Option<String>,
|
||||
pub project_id: Option<i64>,
|
||||
pub after: Option<i64>,
|
||||
pub updated_after: Option<i64>,
|
||||
pub since: Option<i64>,
|
||||
pub updated_since: Option<i64>,
|
||||
pub labels: Vec<String>,
|
||||
pub path: Option<PathFilter>,
|
||||
pub limit: usize,
|
||||
@@ -28,8 +28,8 @@ impl SearchFilters {
|
||||
self.source_type.is_some()
|
||||
|| self.author.is_some()
|
||||
|| self.project_id.is_some()
|
||||
|| self.after.is_some()
|
||||
|| self.updated_after.is_some()
|
||||
|| self.since.is_some()
|
||||
|| self.updated_since.is_some()
|
||||
|| !self.labels.is_empty()
|
||||
|| self.path.is_some()
|
||||
}
|
||||
@@ -85,15 +85,15 @@ pub fn apply_filters(
|
||||
param_idx += 1;
|
||||
}
|
||||
|
||||
if let Some(after) = filters.after {
|
||||
if let Some(since) = filters.since {
|
||||
sql.push_str(&format!(" AND d.created_at >= ?{}", param_idx));
|
||||
params.push(Box::new(after));
|
||||
params.push(Box::new(since));
|
||||
param_idx += 1;
|
||||
}
|
||||
|
||||
if let Some(updated_after) = filters.updated_after {
|
||||
if let Some(updated_since) = filters.updated_since {
|
||||
sql.push_str(&format!(" AND d.updated_at >= ?{}", param_idx));
|
||||
params.push(Box::new(updated_after));
|
||||
params.push(Box::new(updated_since));
|
||||
param_idx += 1;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user