final: extend to 14-day window and clean up debug output
- Increase window from 7 to 14 days for better sample sizes - Remove debug output now that we understand the metrics - Should give more representative averages for response/merge times
This commit is contained in:
6
.github/scripts/parse-metrics.mjs
vendored
6
.github/scripts/parse-metrics.mjs
vendored
@@ -38,13 +38,9 @@ function main() {
|
||||
pr_avg_merge_time: 'N/A'
|
||||
};
|
||||
|
||||
console.log('=== DEBUG: Raw file contents ===');
|
||||
|
||||
// Parse issue metrics
|
||||
if (existsSync('issue_metrics.md')) {
|
||||
const issueContent = readFileSync('issue_metrics.md', 'utf8');
|
||||
console.log('\n--- ISSUE METRICS CONTENT ---');
|
||||
console.log(issueContent.substring(0, 1000) + '...');
|
||||
|
||||
metrics.issues_created = parseCountMetric(issueContent, 'Total number of items created');
|
||||
metrics.issues_closed = parseCountMetric(issueContent, 'Number of items closed');
|
||||
@@ -55,8 +51,6 @@ function main() {
|
||||
// Parse PR metrics
|
||||
if (existsSync('pr_metrics.md')) {
|
||||
const prContent = readFileSync('pr_metrics.md', 'utf8');
|
||||
console.log('\n--- PR METRICS CONTENT ---');
|
||||
console.log(prContent.substring(0, 1000) + '...');
|
||||
|
||||
metrics.prs_created = parseCountMetric(prContent, 'Total number of items created');
|
||||
metrics.prs_merged = parseCountMetric(prContent, 'Number of items closed');
|
||||
|
||||
15
.github/workflows/weekly-metrics-discord.yml
vendored
15
.github/workflows/weekly-metrics-discord.yml
vendored
@@ -27,14 +27,14 @@ jobs:
|
||||
|
||||
- name: Get dates for last week
|
||||
run: |
|
||||
# Last 7 days
|
||||
first_day=$(date -d "7 days ago" +%Y-%m-%d)
|
||||
# Last 14 days
|
||||
first_day=$(date -d "14 days ago" +%Y-%m-%d)
|
||||
last_day=$(date +%Y-%m-%d)
|
||||
|
||||
echo "first_day=$first_day" >> $GITHUB_ENV
|
||||
echo "last_day=$last_day" >> $GITHUB_ENV
|
||||
echo "week_of=$(date -d '7 days ago' +'Week of %B %d, %Y')" >> $GITHUB_ENV
|
||||
echo "date_range=Past 7 days ($first_day to $last_day)" >> $GITHUB_ENV
|
||||
echo "date_range=Past 14 days ($first_day to $last_day)" >> $GITHUB_ENV
|
||||
|
||||
- name: Generate issue metrics
|
||||
uses: github/issue-metrics@v3
|
||||
@@ -69,15 +69,14 @@ jobs:
|
||||
**🎯 Issues**
|
||||
• Created: ${{ steps.metrics.outputs.issues_created }}
|
||||
• Closed: ${{ steps.metrics.outputs.issues_closed }}
|
||||
• Avg Response Time: ${{ steps.metrics.outputs.issue_avg_first_response }}
|
||||
• Avg Time to Close: ${{ steps.metrics.outputs.issue_avg_time_to_close }}
|
||||
|
||||
**🔀 Pull Requests**
|
||||
• Created: ${{ steps.metrics.outputs.prs_created }}
|
||||
• Merged: ${{ steps.metrics.outputs.prs_merged }}
|
||||
|
||||
**⏱️ Response Times**
|
||||
• First Response: ${{ steps.metrics.outputs.avg_first_response }}
|
||||
• Time to Close: ${{ steps.metrics.outputs.avg_time_to_close }}
|
||||
• PR Merge Time: ${{ steps.metrics.outputs.pr_avg_merge_time }}
|
||||
• Avg Response Time: ${{ steps.metrics.outputs.pr_avg_first_response }}
|
||||
• Avg Time to Merge: ${{ steps.metrics.outputs.pr_avg_merge_time }}
|
||||
color: 0x58AFFF
|
||||
username: Task Master Metrics Bot
|
||||
avatar_url: https://raw.githubusercontent.com/eyaltoledano/claude-task-master/main/images/logo.png
|
||||
|
||||
Reference in New Issue
Block a user