Add shared metrics calculation patterns skill #10782
Open
+542
−0
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.
Multiple reporting workflows independently implement similar metrics calculations (issues, PRs, code, workflows), leading to inconsistent naming, duplicated code (~500-750 lines), and difficult cross-report comparisons.
Changes
Created
.github/workflows/shared/metrics-patterns.md(538 lines)Provides 6 standardized calculation patterns:
Each pattern includes:
# Scope: Issues created in last 7 days)specs/metrics-glossary.mdfor naming standardizationUsage
Impact
Updated
.gitignoreto exclude test validation workflow.Original prompt
This section details on the original issue you should resolve
<issue_title>[refactoring] Create shared metrics calculation patterns skill</issue_title>
<issue_description>## Skill Overview
Create a shared component that provides standardized metrics calculation patterns and code snippets for common repository metrics. This will ensure consistency across all reporting workflows and reduce duplication of metrics calculation logic.
Current Usage
This skill pattern appears in the following workflows with repeated metrics calculation code:
daily-issues-report.md(lines 83-191) - Issue metrics with clusteringdaily-code-metrics.md(lines 48-95) - Code quality metricsmetrics-collector.md(lines 44-127) - Workflow performance metricsweekly-issue-summary.md- Issue summary metricsdaily-team-evolution-insights.md- Team activity metricsdaily-regulatory.md- Compliance metricscopilot-session-insights.md- Session analysis metricsdaily-performance-summary.md- Performance metricsdaily-observability-report.md- Observability metricsagent-performance-analyzer.md- Agent quality metricsEstimated: 10-15 workflows currently calculating similar metrics independently
Proposed Shared Component
File:
.github/workflows/shared/metrics-patterns.mdConfiguration:
2. Pull Request Metrics (jq + bash)
3. Code Metrics (bash + cloc)
4. Workflow Performance Metrics (Python)
##...
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.