mirror of
https://github.com/QwenLM/qwen-code.git
synced 2025-12-20 16:57:46 +00:00
Testing basic velocity report action
This commit is contained in:
23
.github/workflows/scripts/generate-report.sh
vendored
Normal file
23
.github/workflows/scripts/generate-report.sh
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
#!/bin/bash
|
||||
|
||||
# --- Configuration ---
|
||||
USERNAMES=("davideast" "hugomurillomtz" "jakemac53" "richieforeman" "shishu314" "shrutip90" "i14h" "hritan")
|
||||
|
||||
# --- Date Calculation ---
|
||||
START_DATE=$(date -d "last Friday" +%Y-%m-%d)
|
||||
END_DATE=$(date -d "last Thursday" +%Y-%m-%d)
|
||||
DATE_RANGE="${START_DATE}..${END_DATE}"
|
||||
|
||||
# --- Report Generation ---
|
||||
# Print a header row for the CSV
|
||||
echo "Date Range,Username,PRs Submitted,Issues Closed"
|
||||
|
||||
# Loop through each user and generate a data row
|
||||
for USER in "${USERNAMES[@]}"; do
|
||||
# Get metrics using the GitHub CLI
|
||||
PRS_SUBMITTED=$(gh pr list --author "${USER}" --search "created:${DATE_RANGE}" --repo "${GITHUB_REPO}" --json number --jq 'length')
|
||||
ISSUES_CLOSED=$(gh issue list --search 'closer:"${USER}" closed:${DATE_RANGE}' --repo "${GITHUB_REPO}" --json number --jq 'length')
|
||||
|
||||
# Print the data as a CSV row
|
||||
echo "${START_DATE} to ${END_DATE},${USER},${PRS_SUBMITTED},${ISSUES_CLOSED}"
|
||||
done
|
||||
Reference in New Issue
Block a user