Skip to content

feat(lib): add hub-release-analyzer for GitHub release analytics#183

Open
wherka-ama wants to merge 1 commit intoAmadeusITGroup:mainfrom
wherka-ama:feature/hub-release-analyzer
Open

feat(lib): add hub-release-analyzer for GitHub release analytics#183
wherka-ama wants to merge 1 commit intoAmadeusITGroup:mainfrom
wherka-ama:feature/hub-release-analyzer

Conversation

@wherka-ama
Copy link
Member

Description

Add hub-release-analyzer CLI tool to analyze GitHub release download statistics for prompt-registry hub configurations. This tool provides technical KPIs on bundle/version usage by scanning hub sources and aggregating release download counts into CSV and Markdown reports.

Type of Change

  • ✨ New feature (non-breaking change which adds functionality)

Related Issues

Changes Made

  • Added hub-release-analyzer CLI script (lib/bin/hub-release-analyzer.js)
  • Added comprehensive unit tests (lib/test/hub-release-analyzer.test.ts, 34 test cases)
  • Added reference shell script (scripts/analyze-release-downloads.sh)
  • Updated lib/package.json with new bin entry
  • Updated lib/README.md with usage documentation

Testing

Test Coverage

  • Unit tests added/updated
  • Manual testing completed
  • All existing tests pass

Manual Testing Steps

  1. Run node lib/bin/hub-release-analyzer.js --help to verify CLI help output
  2. Run dry-run test: node lib/bin/hub-release-analyzer.js --dry-run https://github.com/Amadeus-xDLC/genai.prompt-registry-config
  3. Verify CSV/Markdown report generation in analytics-output/ directory
  4. Run unit tests: cd lib && npm test -- test/hub-release-analyzer.test.ts

Tested On

  • macOS
  • Windows
  • Linux

Screenshots

Checklist

  • My code follows the project's style guidelines
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings or errors
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published

Documentation

  • README.md updated
  • JSDoc comments added/updated
  • No documentation changes needed

Additional Notes

The tool supports three input types:

  1. Local hub configuration files (./hub-config.yml)
  2. GitHub repository URLs (https://github.com/owner/repo)
  3. Direct YAML URLs (https://.../hub-config.yml)

The script uses the GitHub CLI (gh) for API authentication and supports concurrent fetching from multiple sources with configurable concurrency limits.

Specification document: .tmp/HUB_ANALYZER_SPEC.md contains detailed algorithm design (not part of commit).

Reviewer Guidelines

Please pay special attention to:

  • CLI argument parsing and error handling
  • Concurrent API request implementation
  • CSV/Markdown report formatting
  • Test coverage for edge cases

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache License 2.0.

@wherka-ama wherka-ama requested a review from gblanc-1a March 3, 2026 10:55
@wherka-ama wherka-ama marked this pull request as draft March 3, 2026 10:58
Add CLI tool to analyze GitHub release download statistics for prompt-registry hub configurations.

Features:

- Parse hub configs from local files, GitHub repos, or direct YAML URLs

- Concurrently fetch release data from multiple sources

- Aggregate downloads by source, bundle, and version

- Generate CSV and Markdown reports

- Full unit test coverage
@wherka-ama wherka-ama force-pushed the feature/hub-release-analyzer branch from 3926575 to a472298 Compare March 3, 2026 11:01
@wherka-ama wherka-ama marked this pull request as ready for review March 3, 2026 11:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

1 participant