feat: add comment summary template for activity report highlights#2
Merged
feat: add comment summary template for activity report highlights#2
Conversation
- New --summary-template flag and summary-template action input - Collects merged PR titles, URLs, authors, and labels during processing - Generates comment-template.md with PRs grouped by repository - Includes placeholder sections for human-written thematic summaries - Labels displayed in brackets to aid categorization - New comment-template action output for downstream workflow steps - Works with both org repos and external repositories - Added docs/comment-summary-template.md with usage guide
8 tasks
Update example workflow in README and feature docs to show the full 3-step flow: generate report + template, create issue, then post the template as the first comment using peter-evans/create-or-update-comment.
There was a problem hiding this comment.
Pull request overview
This PR adds a comment summary template feature that auto-generates an editable markdown template containing merged PR details from the activity report period. This addresses the workflow gap where maintainers manually write highlights comments but currently have to manually find and list all merged PRs (as described in QuantEcon/meta#280).
Changes:
- Adds
--summary-templateand--summary-template-fileCLI flags and corresponding GitHub Action inputs to enable template generation - Collects merged PR metadata (title, URL, author, labels) during existing report processing without additional API calls
- Generates
comment-template.mdwith placeholder topic sections, grouped PRs by repository, and contributor acknowledgements - Adds comprehensive documentation in
docs/comment-summary-template.mdwith usage examples and workflow guides
Reviewed changes
Copilot reviewed 6 out of 7 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| generate-report.sh | Adds CLI argument parsing for summary template flags; collects PR details during existing API calls; generates template with grouped PRs and contributors; adds template content to GITHUB_OUTPUT |
| action.yml | Defines new summary-template and summary-template-file inputs with defaults; adds comment-template output; passes new inputs as environment variables |
| docs/comment-summary-template.md | New comprehensive documentation covering feature background, usage (CLI and Action), output format, label benefits, workflows (automated and manual), and configuration options |
| docs/README.md | Adds comment summary template to documentation index with feature highlights |
| README.md | Updates features list, CLI examples, options table, inputs/outputs tables, and example workflow to include summary template functionality |
| CHANGELOG.md | Adds unreleased entry documenting the new feature with all inputs, outputs, and documentation reference |
| .gitignore | Adds comment-template.md and .tmp/ to prevent generated files from being committed |
* feat: add release tracking to comment summary template - Fetch releases published in the report date range via GitHub API - Display releases with 📦 emoji at top of each repo section, before PRs - Include release name, tag, and link to GitHub release page - Works for both organization repos and external tracked repos - Update docs and CHANGELOG with release tracking details - Auto-detect contributors and use markdown links (carried from template branch) * refactor: use single releases table at top of template (Option A) - Replace per-repo inline release bullets with a single consolidated table - Table columns: Repository, Release (name/tag with link), Date - Sorted by publication date (newest first) - Releases section omitted entirely when no releases in the period - PR listings per repo remain unchanged below the table - Update docs example and CHANGELOG * feat: add Releases count column to report table - Fetch releases unconditionally (not just when summary-template enabled) - Add Releases column between Merged PRs and Commits in report table - Release count links to repo's releases page when > 0 - Include in totals row and Details section - Add to external repos table and totals - Include in summary string output * fix: address Copilot review feedback - Add rate_limited_repos/failed_repos error handling for releases API call - Use cross-platform date formatting (GNU first, BSD fallback) - Remove unused all_template_repos dead code block - Add CHANGELOG entry for Releases column in main report table
Use env: variable and action with: input instead of direct ${{ }}
interpolation in run: blocks to prevent shell injection from
PR-derived content (titles, labels, author names).
- Add --debug CLI flag and debug action input (default: false) - Add debug() function that only prints when DEBUG_MODE=true - Replace all 26 'echo DEBUG:' calls with debug() function - Update README, action.yml, and CHANGELOG
- Restructure all api_call assignments to if-guard pattern so set -e doesn't abort the script on API failures (both org and external repos) - Use non-zero-padded day format in releases table (%-d GNU, %e BSD) - Fix comment saying '> 1' to match format_metric() behavior of '> 0' - Soften docs wording from 'all merged PRs' to 'merged PRs' - Document 100-item-per-page API limit in comment template docs
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.
Comment Summary Template & Release Tracking
Adds the ability to auto-generate an editable highlights template alongside the activity report, now including release tracking. This addresses the workflow gap identified in QuantEcon/meta#280 — where maintainers write a hand-curated comment summarizing key work, but currently have to manually find and list all the merged PRs and releases.
What it does
When
--summary-templateis enabled, the script collects merged PR details (title, URL, author, labels) during the existing processing loop — no additional API calls required — and generates acomment-template.mdfile with:Release tracking
The PR also adds a Releases column to the main report table and a consolidated releases table in the comment template:
/repos/{org}/{repo}/releasesfor each active repo (one API call per repo)published_atwithin the date rangeDebug output
All debug messages are now gated behind the
--debugCLI flag (ordebug: 'true'action input). Output is silent by default for a clean user experience.How labels help
If PRs have labels (e.g.,
maintenance,infrastructure,priority: high), they appear in brackets:This makes it much easier to reorganize the flat per-repo list into thematic sections. The value of labels here motivates the labels standardization work in QuantEcon/meta#178.
Usage
CLI:
GitHub Action:
Changes
generate-report.sh— Added--summary-template,--summary-template-file, and--debugflags; collects merged PR details (title, URL, author, labels) during existing PR fetch; generates grouped template file; fetches releases per repo and adds to report table and comment template; all debug output gated behinddebug()functionaction.yml— Newsummary-template,summary-template-file, anddebuginputs; newcomment-templateoutputREADME.md— Updated features, CLI examples, options, inputs/outputs tables, example workflowCHANGELOG.md— Added unreleased entries for comment template, release tracking, releases column, and debug flagdocs/comment-summary-template.md— Full feature documentation with examples, workflow guide, and security note on safe output handlingdocs/README.md— Added to documentation index.gitignore— Addedcomment-template.mdand.tmp/Includes
feat/release-tracking) — merged into this branchRelated