feat: Integrate gh-velocity for automated project metrics#96
Merged
Conversation
Add three GitHub Actions workflows for velocity metrics: - Weekly Discussion post with 7-day project metrics (Monday 09:00 UTC) - PR merge metrics appended to PR body with idempotent sentinel markers - Issue close metrics appended to issue body (skips "not planned") Configuration generated via `gh velocity config preflight --write` with quality categories, bot exclusion, and API throttle settings. Update /release command Step 9 to use `gh velocity quality release` with fallback to legacy release-velocity.sh script. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Delete all 6 custom velocity bash scripts (replaced by gh-velocity) - Add velocity-release.yml workflow triggered on release publish - Update SKILL.md to reference gh-velocity commands instead of scripts - Update AGENTS.md to use `gh velocity issue` for metrics - Update release.md Step 9 to note automation, remove legacy fallback - Use preflight-generated .gh-velocity.yml config Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Use file-based I/O (--body-file) instead of shell variable interpolation for PR/issue body content (prevents shell injection) - Use env: mapping for all GitHub expression interpolation in run: blocks (prevents expression injection) - Pin gh-velocity extension to v0.1.1 in all workflows - Remove unnecessary fetch-depth: 0 from issue/pr workflows - Fix METRICS_BLOCK indentation (was embedding YAML whitespace) - Replace awk+grep sentinel editing with simpler sed approach - Remove stale text from plan doc and SKILL.md Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Let gh-velocity CLI handle posting via --post flag: - Bulk reports (report, quality release) post to Discussions - Single-item commands (issue, pr) post as comments - No sentinel markers, no body editing, no awk/sed needed - Unpin extension version per user request Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
--post automatically selects markdown output format. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Picks up repo-configured issue types (Bug, Feature, Task) and improved discussions config with template documentation. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Change discussion category from General to Announcements - Remove manual fallback from /release Step 9 to prevent double-posting (velocity-release.yml workflow handles it automatically) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.
Summary
velocity-weekly.yml): Posts a Discussion every Monday at 09:00 UTC with 7-day project metricsvelocity-pr.yml): Appends velocity metrics to PR body on merge, with idempotent sentinel markersvelocity-issue.yml): Appends velocity metrics to issue body when closed as completed (skips "not planned")velocity-release.yml): Automatically posts release quality Discussion when a release is publishedgh velocity config preflight --write/releasecommand Step 9 to note release metrics are now automatedgh velocitycommandsKey Design Decisions
<!-- gh-velocity-start/end -->) ensure idempotent body edits on workflow re-runscompletedclosures, not "not planned"gh velocity config preflight --writefor auto-generated, repo-aware configurationworkflow_dispatchon all workflows for manual testingTest plan
gh velocity config validate(already passing locally)velocity-weekly.ymlviaworkflow_dispatchand verify Discussion is createdvelocity-release.ymlviaworkflow_dispatchwith a tag and verify DiscussionPost-Deploy Monitoring & Validation
gh run list --workflow=velocity-weekly.yml --limit=1🤖 Generated with Claude Opus 4.6 (1M context) via Claude Code
Metrics
Opened by @dvhthomas (agent-assisted) on 2026-03-21 14:38 UTC. Merged 2026-03-21 19:23 UTC.
Generated by gh-velocity
How to interpret
Command:
gh velocity pr --postCalcMark/go-calcmark