Generate Community Pulse Report JSON
Overview
Create a report.json file in the /app/ directory containing all gathered metrics in the specified JSON structure.
Step 1: Structure Validation
Ensure the JSON follows this exact structure:
{
"pr": {
"total": <integer>,
"merged": <integer>,
"closed": <integer>,
"avg_merge_days": <float>,
"top_contributor": <string>
},
"issue": {
"total": <integer>,
"bug": <integer>,
"resolved_bugs": <integer>
}
}
Data Type Requirements:
total, merged, closed: Integers (no decimals)
avg_merge_days: Float with exactly 1 decimal place (e.g., 1.2, 15.8)
top_contributor: String (author login, e.g., "octocat")
bug, resolved_bugs: Integers
Step 2: Data Compilation
Gather all metrics from previous steps:
- PR metrics: total count, merged count, closed count, average merge days, top contributor name
- Issue metrics: total count, bug count, resolved bug count
Step 3: File Creation
Write the JSON object to /app/report.json:
- Use standard JSON formatting (valid syntax, proper escaping)
- Ensure file is readable and valid JSON (test with JSON validator)
- Verify the file path is exactly
/app/report.json
Step 4: Validation Checklist
Before finalizing:
Example Output
{
"pr": {
"total": 45,
"merged": 42,
"closed": 3,
"avg_merge_days": 1.2,
"top_contributor": "octocat"
},
"issue": {
"total": 30,
"bug": 9,
"resolved_bugs": 8
}
}
1---2name: generate-community-pulse-report-json3description: Compile gathered PR and issue metrics into a properly formatted JSON file at /app/report.json with the exact required structure and data types.4metadata:5 source: https://skillmd.com/skills/cxcscmu/generate-community-pulse-report-json6---78# Generate Community Pulse Report JSON910## Overview11Create a report.json file in the `/app/` directory containing all gathered metrics in the specified JSON structure.1213## Step 1: Structure Validation14Ensure the JSON follows this exact structure:1516```json17{18 "pr": {19 "total": <integer>,20 "merged": <integer>,21 "closed": <integer>,22 "avg_merge_days": <float>,23 "top_contributor": <string>24 },25 "issue": {26 "total": <integer>,27 "bug": <integer>,28 "resolved_bugs": <integer>29 }30}31```3233**Data Type Requirements:**34- `total`, `merged`, `closed`: Integers (no decimals)35- `avg_merge_days`: Float with exactly 1 decimal place (e.g., `1.2`, `15.8`)36- `top_contributor`: String (author login, e.g., `"octocat"`)37- `bug`, `resolved_bugs`: Integers3839## Step 2: Data Compilation40Gather all metrics from previous steps:41- **PR metrics:** total count, merged count, closed count, average merge days, top contributor name42- **Issue metrics:** total count, bug count, resolved bug count4344## Step 3: File Creation45Write the JSON object to `/app/report.json`:46- Use standard JSON formatting (valid syntax, proper escaping)47- Ensure file is readable and valid JSON (test with JSON validator)48- Verify the file path is exactly `/app/report.json`4950## Step 4: Validation Checklist51Before finalizing:52- [ ] All integer fields contain integers (not floats or strings)53- [ ] `avg_merge_days` is a float with exactly 1 decimal place54- [ ] `top_contributor` is a non-empty string55- [ ] File is valid JSON (no syntax errors)56- [ ] File location is `/app/report.json`57- [ ] Numbers match expected ranges (totals not inflated, averages reasonable)5859## Example Output60```json61{62 "pr": {63 "total": 45,64 "merged": 42,65 "closed": 3,66 "avg_merge_days": 1.2,67 "top_contributor": "octocat"68 },69 "issue": {70 "total": 30,71 "bug": 9,72 "resolved_bugs": 873 }74}75```