{"id":28135497,"url":"https://github.com/featuremind/fm-sync-workspaces","last_synced_at":"2026-03-01T09:35:02.177Z","repository":{"id":292151329,"uuid":"979963180","full_name":"FeatureMind/fm-sync-workspaces","owner":"FeatureMind","description":"Node.js CLI for one-way synchronization of Bitbucket repositories between workspaces.","archived":false,"fork":false,"pushed_at":"2025-05-14T10:34:52.000Z","size":5,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-14T15:19:01.186Z","etag":null,"topics":["atlassian","automation","bitbucket","git","repository","sync"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/FeatureMind.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-05-08T10:49:20.000Z","updated_at":"2025-05-14T10:34:55.000Z","dependencies_parsed_at":"2025-05-08T12:20:14.952Z","dependency_job_id":null,"html_url":"https://github.com/FeatureMind/fm-sync-workspaces","commit_stats":null,"previous_names":["featuremind/fm-sync-workspaces"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/FeatureMind/fm-sync-workspaces","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FeatureMind%2Ffm-sync-workspaces","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FeatureMind%2Ffm-sync-workspaces/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FeatureMind%2Ffm-sync-workspaces/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FeatureMind%2Ffm-sync-workspaces/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/FeatureMind","download_url":"https://codeload.github.com/FeatureMind/fm-sync-workspaces/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FeatureMind%2Ffm-sync-workspaces/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265542410,"owners_count":23785220,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["atlassian","automation","bitbucket","git","repository","sync"],"created_at":"2025-05-14T15:18:58.498Z","updated_at":"2026-03-01T09:35:02.143Z","avatar_url":"https://github.com/FeatureMind.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# FM Sync Workspaces\n\nA command-line tool to sync repositories one-way from a source Bitbucket workspace to a destination Bitbucket workspace. Useful for migrations, maintaining mirrors, or managing repositories across different units.\n\n## ✨ Features\n\n-   One-way sync from source to destination Bitbucket workspace.\n-   Supports multiple repositories per run.\n-   Creates missing repositories in the destination.\n-   Cleans local `repos/` directory before each sync.\n-   Includes `Jenkinsfile` for CI/CD automation.\n-   Configuration via a single `.env` file.\n\n## 🚀 Requirements\n\n-   **Node.js**: `14.x`+ ( `20.x`+ recommended).\n-   **Git**: Installed and in PATH.\n-   **Bitbucket App Passwords**: For source (read access) and destination (write/admin access) workspaces.\n\n## 📦 Installation\n\n1.  Clone \u0026 enter directory:\n    ```bash\n    git clone https://github.com/FeatureMind/fm-sync-workspaces.git\n    cd fm-sync-workspaces\n    ```\n2.  Install dependencies:\n    ```bash\n    npm install\n    ```\n3.  Configure:\n    * Copy `.env.example` to `.env`:\n        ```bash\n        cp .env.example .env\n        ```\n    * Edit `.env` with your Bitbucket details. Key variables:\n        * `REPOS`: Comma-separated repository slugs.\n        * `SOURCE_WORKSPACE`, `SOURCE_USERNAME`, `SOURCE_APP_PASSWORD`\n        * `DEST_WORKSPACE`, `DEST_USERNAME`, `DEST_APP_PASSWORD`, `DEST_PROJECT_KEY`\n        *(Refer to `.env.example` for full details and comments on each variable.)*\n\n## 🛠 Usage\n\n### Local Execution\n\n1.  Ensure `.env` is configured.\n2.  Run:\n    ```bash\n    npm start\n    ```\n    Alternatively:\n    ```bash\n    node index.js\n    ```\n\n### Jenkins Automation\n\n1.  Use the provided `Jenkinsfile`.\n2.  Configure your Jenkins job to pass the required environment variables (from your `.env` content), ideally using Jenkins credentials for sensitive data.\n\n## ⚠️ Key Points\n\n* **Destination Project (`DEST_PROJECT_KEY`):** Must exist in the destination Bitbucket workspace beforehand. The script does *not* create projects.\n* **Repository Creation:** Repositories listed in `REPOS` will be created in the destination project if they don't exist.\n* **Mirroring:** Existing repositories in the destination will be updated to mirror the source. This is a destructive operation for the destination repo's unique history if it diverges.\n* **Permissions:** Ensure App Passwords have correct repository permissions (read for source, write/admin for destination).\n* **Local Cleanup:** The `repos/` directory (local clones) is cleared before each sync.\n\n## 🐛 Troubleshooting\n\n* Review console output/logs for error messages.\n* Verify your `.env` configuration and variable values.\n* Check Bitbucket App Password permissions.\n* For bugs or issues, please [open an issue](https://github.com/FeatureMind/fm-sync-workspaces/issues) on GitHub.\n\n## 🤝 Contributing\n\nContributions via Pull Requests or Issue discussions are welcome.\n\n## 📄 License\n\nMIT License. See [LICENSE](LICENSE) file.\n\n---\nHappy syncing! 😊","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffeaturemind%2Ffm-sync-workspaces","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffeaturemind%2Ffm-sync-workspaces","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffeaturemind%2Ffm-sync-workspaces/lists"}