diff --git a/.github/workflows/daily-code-metrics.lock.yml b/.github/workflows/daily-code-metrics.lock.yml index 2fb8509105..96c31ed426 100644 --- a/.github/workflows/daily-code-metrics.lock.yml +++ b/.github/workflows/daily-code-metrics.lock.yml @@ -1350,6 +1350,17 @@ jobs: For each metric: current value, 7-day % change, 30-day % change, trend indicator (⬆️/➡️/⬇️) + ## Report Formatting Guidelines + + **IMPORTANT**: Use h3 (###) or lower for all headers in the discussion report to maintain proper document hierarchy. The discussion title serves as h1. + + **Structure**: + - Main sections: h3 (###) - e.g., "### 📊 Visualizations" + - Subsections: h4 (####) - e.g., "#### LOC Distribution by Language" + - Detail sections inside `
`: h3/h4 as appropriate + + **Progressive Disclosure**: Keep executive summary and key visualizations visible. Use `
` tags for detailed metrics tables (as already shown in template). + ## Report Format Use detailed template with embedded visualization charts: @@ -1363,34 +1374,34 @@ jobs: ```markdown Brief 2-3 paragraph executive summary highlighting key findings, quality score, notable trends, and any concerns requiring attention. - ## 📊 Visualizations + ### 📊 Visualizations - ### LOC Distribution by Language + #### LOC Distribution by Language ![LOC by Language](URL_FROM_UPLOAD_ASSET) [Analysis of language distribution and changes] - ### Top Directories by LOC + #### Top Directories by LOC ![Top Directories](URL_FROM_UPLOAD_ASSET) [Analysis of directory sizes and organization] - ### Quality Score Breakdown + #### Quality Score Breakdown ![Quality Score](URL_FROM_UPLOAD_ASSET) [Current quality score and component analysis] - ### Test Coverage Analysis + #### Test Coverage Analysis ![Test Coverage](URL_FROM_UPLOAD_ASSET) [Test coverage metrics and recommendations] - ### Code Churn (Last 7 Days) + #### Code Churn (Last 7 Days) ![Code Churn](URL_FROM_UPLOAD_ASSET) [Most changed files and activity patterns] - ### Historical Trends (30 Days) + #### Historical Trends (30 Days) ![Historical Trends](URL_FROM_UPLOAD_ASSET) [Trend analysis and significant changes] @@ -1398,23 +1409,23 @@ jobs:
📈 Detailed Metrics - ## Size Metrics + ### Size Metrics - ### Lines of Code by Language + #### Lines of Code by Language | Language | LOC | % of Total | Change (7d) | |----------|-----|------------|-------------| | Go | X,XXX | XX% | ⬆️ +X% | | JavaScript | X,XXX | XX% | ➡️ 0% | | ... | ... | ... | ... | - ### Lines of Code by Directory + #### Lines of Code by Directory | Directory | LOC | % of Total | Files | |-----------|-----|------------|-------| | pkg/ | X,XXX | XX% | XXX | | cmd/ | X,XXX | XX% | XX | | ... | ... | ... | ... | - ## Quality Indicators + ### Quality Indicators - **Average File Size**: XXX lines - **Large Files (>500 LOC)**: XX files @@ -1422,7 +1433,7 @@ jobs: - **Comment Lines**: X,XXX lines (XX% ratio) - **Comment Density**: XX% - ## Test Coverage + ### Test Coverage - **Test Files**: XX files - **Test LOC** (`test_lines_of_code`): X,XXX lines @@ -1431,7 +1442,7 @@ jobs: - **Trend (7d)**: ⬆️ +X% - **Trend (30d)**: ⬆️ +X% - ## Code Churn (Last 7 Days) + ### Code Churn (Last 7 Days) - **Files Modified**: XXX files - **Commits**: XXX commits @@ -1439,28 +1450,28 @@ jobs: - **Lines Deleted**: -X,XXX lines - **Net Change**: +/-X,XXX lines - ### Most Active Files + #### Most Active Files 1. path/to/file.go: +XXX/-XXX lines 2. path/to/file.js: +XXX/-XXX lines ... - ## Workflow Metrics + ### Workflow Metrics - **Total Workflow Files (.md)** (`total_workflows`): XXX files - **Compiled Workflows (.lock.yml)**: XXX files - **Average Workflow Size**: XXX lines - **Growth (7d)**: ⬆️ +X% - ## Documentation + ### Documentation - **Doc Files (docs/)**: XXX files - **Doc LOC**: X,XXX lines - **Code-to-Docs Ratio**: X.XX:1 - **Documentation Coverage**: XX% - ## Quality Score: XX/100 + ### Quality Score: XX/100 - ### Component Breakdown + #### Component Breakdown - **Test Coverage (30%)**: XX/30 points - **Code Organization (25%)**: XX/25 points - **Documentation (20%)**: XX/20 points @@ -1469,7 +1480,7 @@ jobs:
- ## 💡 Insights & Recommendations + ### 💡 Insights & Recommendations 1. [Specific actionable recommendation based on metrics] 2. [Another recommendation] diff --git a/.github/workflows/daily-code-metrics.md b/.github/workflows/daily-code-metrics.md index 3daf0d0643..0b5803ac9d 100644 --- a/.github/workflows/daily-code-metrics.md +++ b/.github/workflows/daily-code-metrics.md @@ -234,6 +234,17 @@ After generating charts: For each metric: current value, 7-day % change, 30-day % change, trend indicator (⬆️/➡️/⬇️) +## Report Formatting Guidelines + +**IMPORTANT**: Use h3 (###) or lower for all headers in the discussion report to maintain proper document hierarchy. The discussion title serves as h1. + +**Structure**: +- Main sections: h3 (###) - e.g., "### 📊 Visualizations" +- Subsections: h4 (####) - e.g., "#### LOC Distribution by Language" +- Detail sections inside `
`: h3/h4 as appropriate + +**Progressive Disclosure**: Keep executive summary and key visualizations visible. Use `
` tags for detailed metrics tables (as already shown in template). + ## Report Format Use detailed template with embedded visualization charts: @@ -247,34 +258,34 @@ Use detailed template with embedded visualization charts: ```markdown Brief 2-3 paragraph executive summary highlighting key findings, quality score, notable trends, and any concerns requiring attention. -## 📊 Visualizations +### 📊 Visualizations -### LOC Distribution by Language +#### LOC Distribution by Language ![LOC by Language](URL_FROM_UPLOAD_ASSET) [Analysis of language distribution and changes] -### Top Directories by LOC +#### Top Directories by LOC ![Top Directories](URL_FROM_UPLOAD_ASSET) [Analysis of directory sizes and organization] -### Quality Score Breakdown +#### Quality Score Breakdown ![Quality Score](URL_FROM_UPLOAD_ASSET) [Current quality score and component analysis] -### Test Coverage Analysis +#### Test Coverage Analysis ![Test Coverage](URL_FROM_UPLOAD_ASSET) [Test coverage metrics and recommendations] -### Code Churn (Last 7 Days) +#### Code Churn (Last 7 Days) ![Code Churn](URL_FROM_UPLOAD_ASSET) [Most changed files and activity patterns] -### Historical Trends (30 Days) +#### Historical Trends (30 Days) ![Historical Trends](URL_FROM_UPLOAD_ASSET) [Trend analysis and significant changes] @@ -282,23 +293,23 @@ Brief 2-3 paragraph executive summary highlighting key findings, quality score,
📈 Detailed Metrics -## Size Metrics +### Size Metrics -### Lines of Code by Language +#### Lines of Code by Language | Language | LOC | % of Total | Change (7d) | |----------|-----|------------|-------------| | Go | X,XXX | XX% | ⬆️ +X% | | JavaScript | X,XXX | XX% | ➡️ 0% | | ... | ... | ... | ... | -### Lines of Code by Directory +#### Lines of Code by Directory | Directory | LOC | % of Total | Files | |-----------|-----|------------|-------| | pkg/ | X,XXX | XX% | XXX | | cmd/ | X,XXX | XX% | XX | | ... | ... | ... | ... | -## Quality Indicators +### Quality Indicators - **Average File Size**: XXX lines - **Large Files (>500 LOC)**: XX files @@ -306,7 +317,7 @@ Brief 2-3 paragraph executive summary highlighting key findings, quality score, - **Comment Lines**: X,XXX lines (XX% ratio) - **Comment Density**: XX% -## Test Coverage +### Test Coverage - **Test Files**: XX files - **Test LOC** (`test_lines_of_code`): X,XXX lines @@ -315,7 +326,7 @@ Brief 2-3 paragraph executive summary highlighting key findings, quality score, - **Trend (7d)**: ⬆️ +X% - **Trend (30d)**: ⬆️ +X% -## Code Churn (Last 7 Days) +### Code Churn (Last 7 Days) - **Files Modified**: XXX files - **Commits**: XXX commits @@ -323,28 +334,28 @@ Brief 2-3 paragraph executive summary highlighting key findings, quality score, - **Lines Deleted**: -X,XXX lines - **Net Change**: +/-X,XXX lines -### Most Active Files +#### Most Active Files 1. path/to/file.go: +XXX/-XXX lines 2. path/to/file.js: +XXX/-XXX lines ... -## Workflow Metrics +### Workflow Metrics - **Total Workflow Files (.md)** (`total_workflows`): XXX files - **Compiled Workflows (.lock.yml)**: XXX files - **Average Workflow Size**: XXX lines - **Growth (7d)**: ⬆️ +X% -## Documentation +### Documentation - **Doc Files (docs/)**: XXX files - **Doc LOC**: X,XXX lines - **Code-to-Docs Ratio**: X.XX:1 - **Documentation Coverage**: XX% -## Quality Score: XX/100 +### Quality Score: XX/100 -### Component Breakdown +#### Component Breakdown - **Test Coverage (30%)**: XX/30 points - **Code Organization (25%)**: XX/25 points - **Documentation (20%)**: XX/20 points @@ -353,7 +364,7 @@ Brief 2-3 paragraph executive summary highlighting key findings, quality score,
-## 💡 Insights & Recommendations +### 💡 Insights & Recommendations 1. [Specific actionable recommendation based on metrics] 2. [Another recommendation] diff --git a/pkg/cli/templates/github-agentic-workflows.md b/pkg/cli/templates/github-agentic-workflows.md index 9250716025..0724608609 100644 --- a/pkg/cli/templates/github-agentic-workflows.md +++ b/pkg/cli/templates/github-agentic-workflows.md @@ -465,6 +465,16 @@ The YAML frontmatter supports these fields: target-repo: "owner/repo" # Optional: cross-repository ``` When using `safe-outputs.add-labels`, the main job does **not** need `issues: write` or `pull-requests: write` permission since label addition is handled by a separate job with appropriate permissions. + - `remove-labels:` - Safe label removal from issues or PRs + ```yaml + safe-outputs: + remove-labels: + allowed: [automated, stale] # Optional: restrict to specific labels + max: 3 # Optional: maximum number of operations (default: 3) + target: "*" # Optional: "triggering" (default), "*" (any issue/PR), or number + target-repo: "owner/repo" # Optional: cross-repository + ``` + When `allowed` is omitted, any labels can be removed. Use `allowed` to restrict removal to specific labels. When using `safe-outputs.remove-labels`, the main job does **not** need `issues: write` or `pull-requests: write` permission since label removal is handled by a separate job with appropriate permissions. - `add-reviewer:` - Add reviewers to pull requests ```yaml safe-outputs: