mirror of
https://github.com/QwenLM/qwen-code.git
synced 2025-12-19 09:33:53 +00:00
GitHub Action for velocity reporting purposes (#5607)
This commit is contained in:
8
.github/workflows/scripts/generate-report.sh
vendored
8
.github/workflows/scripts/generate-report.sh
vendored
@@ -1,8 +1,5 @@
|
||||
#!/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)
|
||||
@@ -12,8 +9,11 @@ DATE_RANGE="${START_DATE}..${END_DATE}"
|
||||
# Print a header row for the CSV
|
||||
echo "Date Range,Username,PRs Submitted,Issues Closed"
|
||||
|
||||
# Get a list of all repository contributors, filter out bots, and extract the login name
|
||||
USERNAMES=$(gh repo contributors --repo "${GITHUB_REPO}" --json "login" --jq '.[] | select(.login | contains("[bot]") | not) | .login')
|
||||
|
||||
# Loop through each user and generate a data row
|
||||
for USER in "${USERNAMES[@]}"; do
|
||||
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')
|
||||
|
||||
Reference in New Issue
Block a user