feat(reporting): add generate-index command to create HTML index of reports#630
Closed
feat(reporting): add generate-index command to create HTML index of reports#630
Conversation
…eports - Add `generate-index` subcommand to git-perf CLI with options for output path, subdirectory, title, template, and branch - Implement logic to scan gh-pages branch (or specified branch) for report HTML files - Categorize reports into branch reports, commit reports, and custom reports with metadata lookup - Generate a comprehensive HTML index page with sections for each report category - Integrate index generation step into GitHub Actions report workflow with new inputs - Add detailed GitHub Pages integration guide and report templating documentation - Update manpages to document the new generate-index command This allows automatic generation of an index page listing all available performance reports to improve discoverability and integration with static sites like GitHub Pages. Co-authored-by: terragon-labs[bot] <terragon-labs[bot]@users.noreply.github.com>
Add support for an "All Reports" navigation link in generated HTML
reports that links to the index page listing all reports.
Changes:
- Add {{ALL_REPORTS_URL}} template placeholder for customization
- Update default HTML template to include header with "All Reports" link
- Add --all-reports-url CLI argument to specify the index URL
- Update GitHub Action to automatically set the URL when generate-index is enabled
- Update documentation with the new placeholder
- Regenerate manpages
When the GitHub Action generates an index page (generate-index: true),
reports will automatically include a navigation link to that index.
The URL is configurable via the --all-reports-url CLI flag, defaulting
to "index.html" if not specified.
Update the dashboard-example.html template to use the {{ALL_REPORTS_URL}}
placeholder instead of a hardcoded /perf/ path. This ensures the
"All Reports" link correctly points to the index page location.
Also enable generate-index in the CI workflow so the index page is
actually created, making the navigation link functional.
Fix git ls-tree error when no subdirectory is specified by not passing an empty path argument. Previously, an empty string was passed which caused "empty string is not a valid pathspec" error. Also remove the silent fallback on index generation failure so errors are properly surfaced.
Merged generate-index feature with concurrency control comment from master. Both changes are now present in the action.yml file. https://claude.ai/code/session_01V76ZFToJQRuwEvkKEETazt
- Add index-url output when generate-index is enabled - Include "All Reports" link in PR comments for direct navigation - Fix double-slash URL bug by removing trailing slash before path construction - Update action README with new inputs and outputs https://claude.ai/code/session_018aGu8pJVSQhmMZxjysHxbk
Contributor
Performance Report⏱ Performance Results | All Reports Audit ResultsMeasurement Storage SizeCreated by git-perf |
The git log command was using `--` before the commit SHA, which tells git to treat it as a path rather than a revision. This caused all commit lookups to fail, resulting in N/A for date and author fields in the generated index page. https://claude.ai/code/session_018aGu8pJVSQhmMZxjysHxbk
When generating the index page in a shallow clone, commit SHAs from report filenames may not exist in the local history. This change: - First tries to get commit metadata from local git history - If not found, fetches the specific commit from origin (depth=1) - Retries metadata retrieval after fetching This ensures Date and Author columns in the index are populated even when running in CI with shallow clones. https://claude.ai/code/session_018aGu8pJVSQhmMZxjysHxbk
Instead of fetching commits individually (which would be slow with many reports), fetch full history with `git fetch --unshallow` before generating the index. This ensures all commit metadata is available. Also simplified the Rust code by removing per-commit fetching logic - the action now handles ensuring commits are available. https://claude.ai/code/session_018aGu8pJVSQhmMZxjysHxbk
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
generate-indexsubcommand to git-perf CLI with options for output path, subdirectory, title, template, and branchThis allows automatic generation of an index page listing all available performance reports to improve discoverability and integration with static sites like GitHub Pages.
Co-authored-by: terragon-labs[bot] <terragon-labs[bot]@users.noreply.github.com>