{"id":44721513,"url":"https://github.com/lyonsv/gitlab-metrics-collector","last_synced_at":"2026-02-15T16:01:32.109Z","repository":{"id":276882787,"uuid":"930615022","full_name":"lyonsv/gitlab-metrics-collector","owner":"lyonsv","description":null,"archived":false,"fork":false,"pushed_at":"2025-12-18T23:33:15.000Z","size":168,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-12-21T17:36:25.009Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/lyonsv.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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-02-10T23:21:32.000Z","updated_at":"2025-12-18T23:33:18.000Z","dependencies_parsed_at":"2025-02-11T00:29:18.780Z","dependency_job_id":"e676bf52-5215-4672-aae9-784ab417e28e","html_url":"https://github.com/lyonsv/gitlab-metrics-collector","commit_stats":null,"previous_names":["lyonsv/gitlab-metrics-collector"],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/lyonsv/gitlab-metrics-collector","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lyonsv%2Fgitlab-metrics-collector","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lyonsv%2Fgitlab-metrics-collector/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lyonsv%2Fgitlab-metrics-collector/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lyonsv%2Fgitlab-metrics-collector/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lyonsv","download_url":"https://codeload.github.com/lyonsv/gitlab-metrics-collector/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lyonsv%2Fgitlab-metrics-collector/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29483283,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-15T15:33:17.885Z","status":"ssl_error","status_checked_at":"2026-02-15T15:32:53.698Z","response_time":118,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":[],"created_at":"2026-02-15T16:01:12.112Z","updated_at":"2026-02-15T16:01:32.103Z","avatar_url":"https://github.com/lyonsv.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GitLab Metrics Collector 📊\n\n\u003e High-performance CLI tool for collecting and analyzing merge request metrics from GitLab instances.\n\n[![npm version](https://badge.fury.io/js/gitlab-metrics-collector.svg)](https://www.npmjs.com/package/gitlab-metrics-collector)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\n## Features\n\n- ⚡️ Parallel processing for high-speed data collection\n- 🔄 Smart request batching with automatic retries\n- 📊 Monthly merge request statistics in CSV format\n- 📈 Interactive HTML visualization with charts\n- 💬 Interactive prompts for easy configuration\n- ⚙️ Configurable performance settings\n\n## HTML Demo \n\nYou can view a demo of the output by opening the [demo.html](https://github.com/lyonsv/gitlab-metrics-collector/blob/main/demo.html) file.\n\n![image](https://github.com/user-attachments/assets/d97fd958-d314-4c89-bd6a-61e2bf7d58fc)\n\n\u003e **❗ Important Note on Interpreting Metrics**\n\u003e\n\u003e While this tool provides valuable insights into merge request patterns, it's crucial to interpret these metrics within your team's broader context:\n\u003e\n\u003e - Some work naturally requires longer development cycles with fewer MRs\n\u003e - System issues or technical constraints can temporarily affect MR frequency\n\u003e - Personal circumstances and work-life events may impact individual metrics\n\u003e - Changes in metrics often signal something worth exploring, but numbers alone don't tell the whole story\n\u003e\n\u003e For a comprehensive assessment, use this tool in conjunction with other analysis tools such as:\n\u003e - [Radarz](https://radarz.built.ie) for additional team performance insights\n\u003e - Team retrospectives and feedback sessions\n\u003e - Project-specific context and complexity measures\n\u003e\n\u003e Use these metrics as one of many inputs for understanding team dynamics and identifying potential areas for support or improvement, not as absolute performance indicators.\n\n## Prerequisites\n\n1. Install Node.js (16.0.0 or higher):\n   ```bash\n   # Using homebrew on macOS\n   brew install node\n\n   # Or download from nodejs.org\n   # https://nodejs.org/\n   ```\n\n2. Install a package manager:\n   ```bash\n   # Either npm (comes with Node.js)\n   npm install -g npm@latest\n\n   # Or yarn\n   yarn global add yarn\n   ```\n\n## Installation\n\n```bash\n# Install globally using npm\nnpm install -g gitlab-metrics-collector\n\n# OR using yarn\nyarn global add gitlab-metrics-collector\n\n# Verify installation\ngitlab-metrics --version\n```\n\nIf you get a \"command not found\" error after installation:\n\n1. For npm users, make sure global npm binaries are in your PATH:\n```bash\n# Add this to your ~/.zshrc or ~/.bashrc\nexport PATH=\"$PATH:$(npm config get prefix)/bin\"\n```\n\n2. For yarn users, make sure global yarn binaries are in your PATH:\n```bash\n# Add this to your ~/.zshrc or ~/.bashrc\nexport PATH=\"$PATH:$(yarn global bin)\"\n```\n\nAfter adding the PATH, reload your shell:\n```bash\nsource ~/.zshrc  # or source ~/.bashrc\n```\n\n## Configuration\n\nFirst, run the configuration wizard:\n```bash\ngitlab-metrics configure\n```\n\nYou'll be prompted for:\n- GitLab instance URL (defaults to gitlab.com)\n- Personal Access Token (requires `read_api` scope)\n- Target usernames (comma-separated list)\n- Maximum concurrent requests (optional, defaults to 25)\n\n## Usage\n\n### Collecting Metrics\n\nYou can collect metrics either by providing command-line options or through interactive prompts:\n\n#### Using Command-Line Options\n```bash\n# Full command with all options\ngitlab-metrics collect -s 2024-01-01 -e 2024-01-31 -o metrics.csv -f csv\n\n# Minimal command (will prompt for missing options)\ngitlab-metrics collect\n```\n\n### Command Options\n\n| Option | Description | Default | Required | Interactive Prompt |\n|--------|-------------|---------|----------|-------------------|\n| `-s, --start-date` | Start date (YYYY-MM-DD) | - | Yes | Yes, if not provided |\n| `-e, --end-date` | End date (YYYY-MM-DD) | - | Yes | Yes, if not provided |\n| `-o, --output` | Output file path | metrics.csv | No | No |\n| `-c, --concurrent` | Concurrent request limit | 25 | No | No |\n| `-f, --format` | Export format (csv or html) | csv | No | Yes, if not provided |\n\n### Export Formats\n\n#### CSV Format\n- User-based rows\n- Monthly columns (e.g., \"January 2024\")\n- Merge request count per user per month\n\n#### HTML Format\nThe HTML format provides an interactive visualization that includes:\n- **Individual View**: Compare specific team members with optional team average overlay\n- **Team Average View**: See overall team performance (averaged across active developers)\n- **View All**: Display all team members simultaneously\n- Line charts showing merge request trends over time\n- Toggle controls for selecting individual users\n- Team average overlay (purple dashed line) in individual view\n- Responsive design for all screen sizes\n- Detailed tooltips with monthly statistics\n\n**Note on Team Average**: The team average only includes developers with at least 1 MR in each month, providing a more accurate baseline by excluding vacation time, sick leave, or periods before/after employment.\n\nExample commands for different formats:\n```bash\n# Export to CSV (default)\ngitlab-metrics collect -s 2024-01-01 -e 2024-01-31 -o metrics.csv\n\n# Export to interactive HTML visualization\ngitlab-metrics collect -s 2024-01-01 -e 2024-01-31 -o report.html -f html\n```\n\n## Performance Tips\n\n- If you encounter rate limiting:\n  - Reduce concurrent requests: `gitlab-metrics collect -c 15`\n  - Process data in smaller date ranges\n- The tool implements automatic retries with exponential backoff\n- For large teams, consider running during off-peak hours\n\n## Troubleshooting\n\n1. **Command Not Found**\n   - Verify PATH settings as described in Installation section\n   - Try reinstalling the package\n   - Make sure Node.js is properly installed: `node --version`\n\n2. **Rate Limiting**\n   - Reduce concurrent requests using `-c 15` or lower\n   - Check your GitLab token permissions\n   - Verify your token has the `read_api` scope\n\n3. **Connection Issues**\n   - Verify your GitLab URL is correct\n   - Ensure your access token is valid\n   - Check your network connection\n\n4. **Date Format Errors**\n   - Ensure dates are in YYYY-MM-DD format\n   - Start date must be before end date\n   - Dates must be valid calendar dates\n\n## License\n\nReleased under the MIT License. See [LICENSE](LICENSE) for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flyonsv%2Fgitlab-metrics-collector","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flyonsv%2Fgitlab-metrics-collector","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flyonsv%2Fgitlab-metrics-collector/lists"}