diff --git a/.dockerignore b/.dockerignore index 8abc342..d311b20 100644 --- a/.dockerignore +++ b/.dockerignore @@ -17,7 +17,7 @@ docs/ target/ # Local configs and data -config.yaml +repos.yaml cloned_repos/ logs/ diff --git a/.gitignore b/.gitignore index 64f6407..6f34acc 100644 --- a/.gitignore +++ b/.gitignore @@ -29,7 +29,7 @@ cloned_repos*/ coverage/ *.profraw logs/ -config.yaml +repos.yaml tarpaulin-report.html test-*/ tests/test-recipes.yaml diff --git a/README.md b/README.md index 295088b..3b73a56 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ engineers working with complex microservice architectures. ## Features - **Centralized Repository Management**: Define all your repositories in a -single, easy-to-manage `config.yaml` file. +single, easy-to-manage `repos.yaml` file. - **Tag-Based Filtering**: Assign tags to your repositories and use them to run commands on specific subsets of your projects (e.g., `backend`, `frontend`, `java`, `rust`). @@ -113,7 +113,7 @@ for you. 2. **Generate the config file**: Run `repos init` in the `my-projects` directory. It will scan for Git - repositories and create a `config.yaml` file. + repositories and create a `repos.yaml` file. ```bash repos init @@ -139,7 +139,7 @@ overview. Click on a command to see its detailed documentation. | [**`run`**](./docs/commands/run.md) | Runs a shell command or a pre-defined recipe in each repository. | | [**`pr`**](./docs/commands/pr.md) | Creates pull requests for repositories with changes. | | [**`rm`**](./docs/commands/rm.md) | Removes cloned repositories from your local disk. | -| [**`init`**](./docs/commands/init.md) | Generates a `config.yaml` file from local Git repositories. | +| [**`init`**](./docs/commands/init.md) | Generates a `repos.yaml` file from local Git repositories. | | [**`validate`**](./plugins/repos-validate/README.md) | Validates config file, repository connectivity, and synchronizes topics (via plugin). | | [**`review`**](./plugins/repos-review/README.md) | Uses UI to review changes (via plugin). | | [**`fix`**](./plugins/repos-fix/README.md) | Automatically fixes bugs based on JIRA tickets using Cursor AI (via plugin). | @@ -148,7 +148,7 @@ For a full list of options for any command, run `repos --help`. ## Configuration -The `config.yaml` file is the heart of `repos`. It defines your repositories and +The `repos.yaml` file is the heart of `repos`. It defines your repositories and their metadata. ```yaml diff --git a/docs/commands/clone.md b/docs/commands/clone.md index 0c5db36..eb75b91 100644 --- a/docs/commands/clone.md +++ b/docs/commands/clone.md @@ -1,6 +1,6 @@ # repos clone -The `clone` command clones repositories specified in your `config.yaml` file +The `clone` command clones repositories specified in your `repos.yaml` file into your local workspace. ## Usage @@ -24,7 +24,7 @@ repositories defined in the config. ## Options - `-c, --config `: Specifies the path to the configuration file. -Defaults to `config.yaml`. +Defaults to `repos.yaml`. - `-t, --tag `: Filters repositories to clone only those that have the specified tag. This option can be used multiple times to include repositories with *any* of the specified tags (OR logic). diff --git a/docs/commands/init.md b/docs/commands/init.md index 063e45a..c021cf2 100644 --- a/docs/commands/init.md +++ b/docs/commands/init.md @@ -1,7 +1,7 @@ # repos init The `init` command scans your local filesystem for Git repositories and -generates a `config.yaml` file from them. +generates a `repos.yaml` file from them. ## Usage @@ -12,14 +12,14 @@ repos init [OPTIONS] ## Description This command is the easiest way to get started with `repos`. Instead of writing -a `config.yaml` file by hand, you can clone your repositories into a directory +a `repos.yaml` file by hand, you can clone your repositories into a directory and then run `repos init` to automatically generate the configuration. It will discover all Git repositories in the current directory and its subdirectories. ## Options - `-o, --output `: Specifies the name of the output configuration file. -Defaults to `config.yaml`. +Defaults to `repos.yaml`. - `--overwrite`: If a configuration file already exists at the output path, this flag allows `repos` to overwrite it. - `--supplement`: If a configuration file already exists, this flag will add @@ -42,7 +42,7 @@ git clone https://github.com/owner/project-two.git repos init ``` -This will create a `config.yaml` file in the `my-projects` directory. +This will create a `repos.yaml` file in the `my-projects` directory. ### Generate a config with a custom name @@ -58,12 +58,12 @@ repos init --overwrite ### Add new repositories to an existing config -If you have an existing `config.yaml` and have cloned new repositories, you can +If you have an existing `repos.yaml` and have cloned new repositories, you can add them without losing your existing configuration (including tags, custom paths, etc.). ```bash -# config.yaml already exists +# repos.yaml already exists git clone https://github.com/owner/new-project.git repos init --supplement ``` diff --git a/docs/commands/ls.md b/docs/commands/ls.md index 7897d57..44cc0bd 100644 --- a/docs/commands/ls.md +++ b/docs/commands/ls.md @@ -1,6 +1,6 @@ # repos ls -The `ls` command lists repositories specified in your `config.yaml` file with +The `ls` command lists repositories specified in your `repos.yaml` file with optional filtering capabilities. ## Usage @@ -28,7 +28,7 @@ repositories defined in the config. ## Options - `-c, --config `: Specifies the path to the configuration file. -Defaults to `config.yaml`. +Defaults to `repos.yaml`. - `-t, --tag `: Filters repositories to list only those that have the specified tag. This option can be used multiple times to include repositories with *any* of the specified tags (OR logic). @@ -114,7 +114,7 @@ repos clone --tag flow ### Use with custom config ```bash -repos ls --config path/to/custom-config.yaml +repos ls --config path/to/custom-repos.yaml ``` ## Use Cases diff --git a/docs/commands/pr.md b/docs/commands/pr.md index bdc83e8..8973955 100644 --- a/docs/commands/pr.md +++ b/docs/commands/pr.md @@ -43,7 +43,7 @@ the `GITHUB_TOKEN` environment variable. - `--create-only`: A "dry-run" mode. It prepares the PR but does not create it on GitHub. - `-c, --config `: Path to the configuration file. Defaults to -`config.yaml`. +`repos.yaml`. - `-t, --tag `: Filter repositories by tag. Can be specified multiple times. - `-e, --exclude-tag `: Exclude repositories with a specific tag. diff --git a/docs/commands/rm.md b/docs/commands/rm.md index 2231ed6..0134d76 100644 --- a/docs/commands/rm.md +++ b/docs/commands/rm.md @@ -22,7 +22,7 @@ If not provided, filtering will be based on tags. ## Options - `-c, --config `: Path to the configuration file. Defaults to -`config.yaml`. +`repos.yaml`. - `-t, --tag `: Filter repositories to remove only those with the specified tag. Can be used multiple times. - `-e, --exclude-tag `: Exclude repositories with a specific tag diff --git a/docs/commands/run.md b/docs/commands/run.md index fc8d8ff..5ed40fd 100644 --- a/docs/commands/run.md +++ b/docs/commands/run.md @@ -24,7 +24,7 @@ tasks across hundreds or thousands of repositories at once. You can run any shell command, from simple `ls` to complex `docker build` scripts. Additionally, you can define **recipes**—multi-step scripts—in your -`config.yaml` and execute them by name using the `--recipe` option. This is +`repos.yaml` and execute them by name using the `--recipe` option. This is perfect for standardizing complex workflows like dependency updates, code generation, or release preparation. @@ -41,7 +41,7 @@ command in. If not provided, filtering will be based on tags. ## Options - `-c, --config `: Path to the configuration file. Defaults to -`config.yaml`. +`repos.yaml`. - `-r, --recipe `: The name of the recipe to run. This option is mutually exclusive with the `COMMAND` argument. - `-t, --tag `: Filter repositories by tag. Can be specified multiple times @@ -57,12 +57,12 @@ instead of the default `output/runs`. ## Recipes -Recipes are named, multi-step scripts defined in your `config.yaml`. They allow +Recipes are named, multi-step scripts defined in your `repos.yaml`. They allow you to codify and reuse common workflows. ### Defining a Recipe -Add a `recipes` section to your `config.yaml`: +Add a `recipes` section to your `repos.yaml`: ```yaml recipes: diff --git a/docs/plugins.md b/docs/plugins.md index 2cafd42..2118f3c 100644 --- a/docs/plugins.md +++ b/docs/plugins.md @@ -39,7 +39,7 @@ The core CLI: - `REPOS_DEBUG=1` (if --debug flag was passed) - `REPOS_TOTAL_REPOS=28` (total repos in config) - `REPOS_FILTERED_COUNT=5` (repos after filtering) - - `REPOS_CONFIG_FILE=/path/to/your/config.yaml` (path to config file) + - `REPOS_CONFIG_FILE=/path/to/your/repos.yaml` (path to config file) 6. Executes `repos-health prs` with only plugin-specific args ### Using Context Injection in Your Plugin @@ -174,7 +174,7 @@ Here's a simple example of a health check plugin written in bash: echo "=== Repository Health Check ===" # Parse arguments -CONFIG_FILE="config.yaml" +CONFIG_FILE="repos.yaml" VERBOSE=false while [[ $# -gt 0 ]]; do @@ -222,7 +222,7 @@ import sys def main(): parser = argparse.ArgumentParser(description='Security audit for repositories') - parser.add_argument('-c', '--config', default='config.yaml', help='Config file path') + parser.add_argument('-c', '--config', default='repos.yaml', help='Config file path') parser.add_argument('--fix', action='store_true', help='Attempt to fix issues automatically') args = parser.parse_args() @@ -291,7 +291,7 @@ Examples: repos health # Run health check with custom config and verbose output -repos health -c my-config.yaml -v +repos health -c my-repos.yaml -v # Run security audit repos security --config production.yaml @@ -324,7 +324,7 @@ repos security --fix ### Integration -- Plugins should work with the standard `config.yaml` format +- Plugins should work with the standard `repos.yaml` format - Parse the YAML configuration to access repository information - Consider the repository structure (name, path, tags, etc.) @@ -338,14 +338,14 @@ Most plugins will need to read the repos configuration file. Here's how to parse ```bash # Install yq: brew install yq (macOS) or similar -repos=$(yq eval '.repositories[].name' config.yaml) +repos=$(yq eval '.repositories[].name' repos.yaml) ``` **Python:** ```python import yaml -with open('config.yaml', 'r') as f: +with open('repos.yaml', 'r') as f: config = yaml.safe_load(f) repositories = config.get('repositories', []) ``` @@ -356,7 +356,7 @@ with open('config.yaml', 'r') as f: use serde_yaml; use std::fs; -let content = fs::read_to_string("config.yaml")?; +let content = fs::read_to_string("repos.yaml")?; let config: serde_yaml::Value = serde_yaml::from_str(&content)?; ``` diff --git a/docs/test-inventory.md b/docs/test-inventory.md index 2751b7c..7c18fe2 100644 --- a/docs/test-inventory.md +++ b/docs/test-inventory.md @@ -11,8 +11,8 @@ inventory complements existing automated tests and surfaces gaps. ### 1.1 Load valid config file with repositories and recipes - Description: Verify a well-formed YAML with repositories + recipes parses into internal model. -- Preconditions: `config.yaml` exists, contains at least one repository and one recipe. -- Steps: Run any command requiring config load (e.g. `repos clone --config config.yaml`). +- Preconditions: `repos.yaml` exists, contains at least one repository and one recipe. +- Steps: Run any command requiring config load (e.g. `repos clone --config repos.yaml`). - Expected: - Happy: Config loads; repositories & recipes accessible; no warnings. - Negative: N/A (covered in malformed / missing cases below). diff --git a/plugins/repos-validate/README.md b/plugins/repos-validate/README.md index b9d87e0..e92caee 100644 --- a/plugins/repos-validate/README.md +++ b/plugins/repos-validate/README.md @@ -1,18 +1,18 @@ # repos-validate Plugin -The `repos-validate` plugin checks your `config.yaml` file for correctness, +The `repos-validate` plugin checks your `repos.yaml` file for correctness, verifies repository accessibility, and can synchronize GitHub topics with local tags. ## Features -- **Configuration Syntax Validation**: Confirms that `config.yaml` is properly +- **Configuration Syntax Validation**: Confirms that `repos.yaml` is properly formatted and parseable. - **Repository Connectivity Check**: Verifies that each repository exists and is accessible. - **Topic Synchronization**: Synchronizes GitHub topics with config tags, adding missing topics from GitHub to your local config and prefixing them with `gh:`. -- **Automatic Backup**: Creates timestamped backups before modifying `config.yaml`. +- **Automatic Backup**: Creates timestamped backups before modifying `repos.yaml`. ## Installation @@ -38,13 +38,13 @@ repos validate [OPTIONS] This command performs several levels of validation: 1. **Syntax Validation (Default)**: By default, `repos validate` only parses the -`config.yaml` file to ensure it is well-formed. No network calls are made. +`repos.yaml` file to ensure it is well-formed. No network calls are made. 2. **Connectivity Check**: When the `--connect` flag is added, it performs the syntax check and also attempts to connect to the Git remote URL for each repository. This verifies that the repository exists and that you have the necessary access permissions. 3. **GitHub Topic Synchronization**: The `--sync-topics` option (which requires -`--connect`) compares the tags in your `config.yaml` with the repository topics +`--connect`) compares the tags in your `repos.yaml` with the repository topics on GitHub. It will suggest adding missing topics as tags (with a `gh:` prefix) to your configuration. By itself, this option only shows a diff of the suggested changes. @@ -55,16 +55,16 @@ running bulk operations like `clone` or `run`. ## Options - `-c, --config `: Specifies the path to the configuration file. -Defaults to `config.yaml`. +Defaults to `repos.yaml`. - `--connect`: Checks network connectivity by attempting to connect to each repository's remote URL. - `--sync-topics`: Must be used with `--connect`. Compares repository topics on -GitHub with local tags in `config.yaml` and suggests changes. It will prefix +GitHub with local tags in `repos.yaml` and suggests changes. It will prefix tags sourced from GitHub with `gh:`. This option only prints a diff of the suggested changes; it does not modify the file. - `--apply`: Must be used with `--sync-topics`. Applies the suggested topic -synchronization changes directly to your `config.yaml` file. A backup of the -original `config.yaml` will be created before changes are written. +synchronization changes directly to your `repos.yaml` file. A backup of the +original `repos.yaml` will be created before changes are written. - `-h, --help`: Prints help information. ## Examples @@ -81,7 +81,7 @@ repos validate Example output: ```console -✅ config.yaml syntax is valid. +✅ repos.yaml syntax is valid. 42 repositories in config 15 unique tags: api, backend, cli, deprecated, frontend, gh:automation, gh:cli, gh:rust, java, javascript, microservice, python, rust, typescript, web @@ -100,7 +100,7 @@ repos validate --connect Example output: ```console -✅ config.yaml syntax is valid. +✅ repos.yaml syntax is valid. 42 repositories in config 15 unique tags: api, backend, cli, deprecated, frontend, gh:automation, gh:cli, gh:rust, java, javascript, microservice, python, rust, typescript, web @@ -114,7 +114,7 @@ Validation finished successfully. ### Preview topic synchronization changes This will check connectivity and show you which topics are on GitHub but are -missing from the tags in your `config.yaml`. No files will be changed. +missing from the tags in your `repos.yaml`. No files will be changed. ```bash repos validate --connect --sync-topics @@ -123,7 +123,7 @@ repos validate --connect --sync-topics Example output: ```console -✅ config.yaml syntax is valid. +✅ repos.yaml syntax is valid. 42 repositories in config 15 unique tags: api, backend, cli, deprecated, frontend, gh:automation, gh:cli, gh:rust, java, javascript, microservice, python, rust, typescript, web @@ -139,7 +139,7 @@ Validation finished successfully. ### Apply topic synchronization changes This will check connectivity, find missing topics, and automatically add them as -tags (with a `gh:` prefix) to your `config.yaml`. +tags (with a `gh:` prefix) to your `repos.yaml`. ```bash repos validate --connect --sync-topics --apply @@ -148,7 +148,7 @@ repos validate --connect --sync-topics --apply Example output: ```console -✅ config.yaml syntax is valid. +✅ repos.yaml syntax is valid. 42 repositories in config 15 unique tags: api, backend, cli, deprecated, frontend, gh:automation, gh:cli, gh:rust, java, javascript, microservice, python, rust, typescript, web @@ -160,9 +160,9 @@ Validating repository connectivity... Validation finished successfully. -Applying topic synchronization to config.yaml... -✅ Created backup: "config.yaml.backup.20251111_143022" -✅ Successfully updated config.yaml +Applying topic synchronization to repos.yaml... +✅ Created backup: "repos.yaml.backup.20251111_143022" +✅ Successfully updated repos.yaml 1 repositories were synchronized ``` @@ -172,13 +172,13 @@ When using `--apply`, the plugin automatically creates a backup before modifying your configuration. Backup files are named with a timestamp pattern: ```console -config.yaml.backup.YYYYMMDD_HHMMSS +repos.yaml.backup.YYYYMMDD_HHMMSS ``` You can restore from a backup at any time: ```bash -cp config.yaml.backup.20251111_143022 config.yaml +cp repos.yaml.backup.20251111_143022 repos.yaml ``` ## Authentication diff --git a/plugins/repos-validate/src/main.rs b/plugins/repos-validate/src/main.rs index 3aeea03..d38e15b 100644 --- a/plugins/repos-validate/src/main.rs +++ b/plugins/repos-validate/src/main.rs @@ -9,7 +9,7 @@ use std::path::PathBuf; #[derive(Parser, Debug)] #[command(name = "repos-validate")] -#[command(about = "Validate config.yaml syntax and repository connectivity")] +#[command(about = "Validate repos.yaml syntax and repository connectivity")] struct Args { /// Validate connectivity to repositories #[arg(long)] @@ -19,7 +19,7 @@ struct Args { #[arg(long, requires = "connect")] sync_topics: bool, - /// Apply the topic synchronization to config.yaml (requires --sync-topics) + /// Apply the topic synchronization to repos.yaml (requires --sync-topics) #[arg(long, requires = "sync_topics")] apply: bool, } @@ -37,7 +37,7 @@ async fn main() -> Result<()> { eprintln!("Loaded {} repositories from context", repos.len()); } - println!("{}", "✅ config.yaml syntax is valid.".green()); + println!("{}", "✅ repos.yaml syntax is valid.".green()); // Display summary information println!(" {} repositories in config", repos.len()); @@ -231,8 +231,8 @@ fn get_config_path() -> Result { return Ok(PathBuf::from(config)); } - // Default to config.yaml in current directory - Ok(PathBuf::from("config.yaml")) + // Default to repos.yaml in current directory + Ok(PathBuf::from("repos.yaml")) } fn create_backup(config_path: &PathBuf) -> Result { @@ -247,7 +247,7 @@ fn create_backup(config_path: &PathBuf) -> Result { } fn apply_sync(config_path: &PathBuf, sync_map: &HashMap) -> Result<()> { - println!("Applying topic synchronization to config.yaml..."); + println!("Applying topic synchronization to repos.yaml..."); // Create backup first create_backup(config_path)?; @@ -258,7 +258,7 @@ fn apply_sync(config_path: &PathBuf, sync_map: &HashMap) -> R // Parse as YAML let mut config: serde_yaml::Value = - serde_yaml::from_str(&content).context("Failed to parse config.yaml")?; + serde_yaml::from_str(&content).context("Failed to parse repos.yaml")?; // Update repositories with synchronized topics if let Some(repos) = config @@ -301,7 +301,7 @@ fn apply_sync(config_path: &PathBuf, sync_map: &HashMap) -> R save_config(&config, config_path.to_str().unwrap()) .context("Failed to write updated config")?; - println!("{} Successfully updated config.yaml", "✅".green()); + println!("{} Successfully updated repos.yaml", "✅".green()); println!(" {} repositories were synchronized", sync_map.len()); Ok(()) diff --git a/src/commands/init.rs b/src/commands/init.rs index 2a21297..609ea61 100644 --- a/src/commands/init.rs +++ b/src/commands/init.rs @@ -171,7 +171,7 @@ mod tests { // Change to temp directory (empty, no git repos) std::env::set_current_dir(temp_dir.path()).unwrap(); - let output_path = temp_dir.path().join("empty-config.yaml"); + let output_path = temp_dir.path().join("empty-repos.yaml"); let command = InitCommand { output: output_path.to_string_lossy().to_string(), overwrite: false, @@ -202,7 +202,7 @@ mod tests { #[tokio::test] async fn test_init_command_no_overwrite_existing_file() { let temp_dir = TempDir::new().unwrap(); - let output_path = temp_dir.path().join("existing-config.yaml"); + let output_path = temp_dir.path().join("existing-repos.yaml"); // Create existing file fs::write(&output_path, "existing content").unwrap(); @@ -251,7 +251,7 @@ mod tests { #[serial] async fn test_init_command_supplement_with_existing_config() { let temp_dir = TempDir::new().unwrap(); - let output_path = temp_dir.path().join("existing-config.yaml"); + let output_path = temp_dir.path().join("existing-repos.yaml"); // Create existing config with one repository let existing_config = Config { @@ -303,7 +303,7 @@ mod tests { #[serial] async fn test_init_command_supplement_without_existing_config() { let temp_dir = TempDir::new().unwrap(); - let output_path = temp_dir.path().join("new-config.yaml"); + let output_path = temp_dir.path().join("new-repos.yaml"); let original_dir = std::env::current_dir().unwrap(); // Change to temp directory (empty, no git repos) diff --git a/src/config/loader.rs b/src/config/loader.rs index ccd5855..5f99341 100644 --- a/src/config/loader.rs +++ b/src/config/loader.rs @@ -160,7 +160,7 @@ impl Default for Config { /// Save a config to a file with proper YAML formatting and comment preservation /// -/// This is the centralized function for writing config.yaml files. It ensures: +/// This is the centralized function for writing repos.yaml files. It ensures: /// - Leading comments are preserved /// - YAML document start marker (---) is added after comments /// - Proper indentation for yamllint compliance diff --git a/src/constants.rs b/src/constants.rs index 38b52ef..abf9e3a 100644 --- a/src/constants.rs +++ b/src/constants.rs @@ -27,7 +27,7 @@ pub mod github { /// Default values for configuration pub mod config { /// Default configuration file name - pub const DEFAULT_CONFIG_FILE: &str = "config.yaml"; + pub const DEFAULT_CONFIG_FILE: &str = "repos.yaml"; /// Default output directory pub const DEFAULT_LOGS_DIR: &str = "output"; diff --git a/src/main.rs b/src/main.rs index dc3da52..6a83e0d 100644 --- a/src/main.rs +++ b/src/main.rs @@ -49,8 +49,8 @@ enum Commands { #[arg(value_name = "COMMAND", help = "Command to execute")] command: Option, - /// Name of a recipe defined in config.yaml - #[arg(long, help = "Name of a recipe defined in config.yaml")] + /// Name of a recipe defined in repos.yaml + #[arg(long, help = "Name of a recipe defined in repos.yaml")] recipe: Option, /// Specific repository names to run command in (if not provided, uses tag filter or all repos) @@ -179,7 +179,7 @@ enum Commands { json: bool, }, - /// Create a config.yaml file from discovered Git repositories + /// Create a repos.yaml file from discovered Git repositories Init { /// Output file name #[arg(short, long, default_value_t = constants::config::DEFAULT_CONFIG_FILE.to_string())] diff --git a/tests/cli_tests.rs b/tests/cli_tests.rs index 32ab9a8..f208c88 100644 --- a/tests/cli_tests.rs +++ b/tests/cli_tests.rs @@ -15,7 +15,7 @@ struct Workspace { impl Workspace { fn new() -> Self { let root = TempDir::new().expect("Failed to create temp dir"); - let config_path = root.path().join("config.yaml"); + let config_path = root.path().join("repos.yaml"); Self { root, config_path } } diff --git a/tests/init_command_tests.rs b/tests/init_command_tests.rs index 7041a06..940afe8 100644 --- a/tests/init_command_tests.rs +++ b/tests/init_command_tests.rs @@ -30,7 +30,7 @@ fn create_git_repo(path: &std::path::Path) -> std::io::Result<()> { #[serial] async fn test_init_command_basic_creation() { let temp_dir = TempDir::new().unwrap(); - let output_path = temp_dir.path().join("basic-config.yaml"); + let output_path = temp_dir.path().join("basic-repos.yaml"); // Create a git repository so the command has something to discover let repo_dir = temp_dir.path().join("test-repo"); @@ -70,7 +70,7 @@ async fn test_init_command_basic_creation() { #[serial] async fn test_init_command_overwrite_existing_file() { let temp_dir = TempDir::new().unwrap(); - let output_path = temp_dir.path().join("existing-config.yaml"); + let output_path = temp_dir.path().join("existing-repos.yaml"); // Create existing file fs::write(&output_path, "existing content").unwrap(); @@ -113,7 +113,7 @@ async fn test_init_command_overwrite_existing_file() { #[serial] async fn test_init_command_no_overwrite_existing_file() { let temp_dir = TempDir::new().unwrap(); - let output_path = temp_dir.path().join("existing-config.yaml"); + let output_path = temp_dir.path().join("existing-repos.yaml"); // Create existing file fs::write(&output_path, "existing content").unwrap(); @@ -161,7 +161,7 @@ async fn test_init_command_with_git_repository() { ) .unwrap(); - let output_path = temp_dir.path().join("discovered-config.yaml"); + let output_path = temp_dir.path().join("discovered-repos.yaml"); let command = InitCommand { output: output_path.to_string_lossy().to_string(), overwrite: false, @@ -193,7 +193,7 @@ async fn test_init_command_with_git_repository() { #[serial] async fn test_init_command_supplement_with_duplicate_repository() { let temp_dir = TempDir::new().unwrap(); - let output_path = temp_dir.path().join("config-with-duplicate.yaml"); + let output_path = temp_dir.path().join("repos-with-duplicate.yaml"); // Create existing config with a repository let existing_config = Config { @@ -243,7 +243,7 @@ async fn test_init_command_supplement_with_duplicate_repository() { #[serial] async fn test_init_command_supplement_with_new_repository() { let temp_dir = TempDir::new().unwrap(); - let output_path = temp_dir.path().join("config-with-supplement.yaml"); + let output_path = temp_dir.path().join("repos-with-supplement.yaml"); // Create existing config with one repository let existing_config = Config { @@ -309,7 +309,7 @@ async fn test_init_command_git_directory_edge_cases() { fs::create_dir_all(&repo_with_git_file).unwrap(); fs::write(repo_with_git_file.join(".git"), "gitdir: ../real-git-dir").unwrap(); - let output_path = temp_dir.path().join("edge-case-config.yaml"); + let output_path = temp_dir.path().join("edge-case-repos.yaml"); let command = InitCommand { output: output_path.to_string_lossy().to_string(), overwrite: false, @@ -340,7 +340,7 @@ async fn test_init_command_git_directory_edge_cases() { #[serial] async fn test_init_command_empty_directory() { let temp_dir = TempDir::new().unwrap(); - let output_path = temp_dir.path().join("empty-config.yaml"); + let output_path = temp_dir.path().join("empty-repos.yaml"); let command = InitCommand { output: output_path.to_string_lossy().to_string(), @@ -387,7 +387,7 @@ async fn test_init_command_multiple_git_repositories() { create_git_repo(repo_dir).unwrap(); } - let output_path = temp_dir.path().join("multi-repo-config.yaml"); + let output_path = temp_dir.path().join("multi-repo-repos.yaml"); let command = InitCommand { output: output_path.to_string_lossy().to_string(), overwrite: false, @@ -498,7 +498,7 @@ async fn test_init_command_discovers_repos_two_levels_deep() { .output() .unwrap(); - let output_path = temp_dir.path().join("two-levels-config.yaml"); + let output_path = temp_dir.path().join("two-levels-repos.yaml"); let command = InitCommand { output: output_path.to_string_lossy().to_string(), overwrite: false, @@ -591,7 +591,7 @@ async fn test_init_command_depth_boundary() { .output() .unwrap(); - let output_path = temp_dir.path().join("depth-boundary-config.yaml"); + let output_path = temp_dir.path().join("depth-boundary-repos.yaml"); let command = InitCommand { output: output_path.to_string_lossy().to_string(), overwrite: false, diff --git a/tests/support.rs b/tests/support.rs index ced157b..a6ff30b 100644 --- a/tests/support.rs +++ b/tests/support.rs @@ -34,7 +34,7 @@ impl Workspace { /// Create a new temporary workspace pub fn new() -> Self { let root = TempDir::new().expect("Failed to create temp directory"); - let config_path = root.path().join("config.yaml"); + let config_path = root.path().join("repos.yaml"); Self { root, config_path } }