https://github.com/quantecon/action-weekly-report
GitHub Action for generating weekly activity reports across GitHub organizations
https://github.com/quantecon/action-weekly-report
analytics documentation github-action github-api quantecon reporting
Last synced: 3 months ago
JSON representation
GitHub Action for generating weekly activity reports across GitHub organizations
- Host: GitHub
- URL: https://github.com/quantecon/action-weekly-report
- Owner: QuantEcon
- License: mit
- Created: 2025-10-01T01:36:33.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2025-10-01T03:01:47.000Z (4 months ago)
- Last Synced: 2025-10-01T04:08:26.109Z (4 months ago)
- Topics: analytics, documentation, github-action, github-api, quantecon, reporting
- Language: Shell
- Size: 13.7 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Security: SECURITY.md
Awesome Lists containing this project
README
# QuantEcon Weekly Report Action
[](https://github.com/QuantEcon/action-weekly-report/actions/workflows/ci.yml)
[](https://github.com/marketplace/actions/quantecon-weekly-report)
A powerful GitHub Action that generates comprehensive weekly activity reports across GitHub organizations. Perfect for tracking team productivity, repository health, and development trends.
## 🎯 Features
- **📊 Comprehensive Analytics**: Issues, PRs, commits, and activity summaries
- **⚡ Smart Filtering**: Only checks repositories with recent activity for efficiency
- **🛡️ Rate Limit Resilient**: Built-in retry logic and configurable delays
- **📋 Multiple Formats**: Markdown and JSON output options
- **🎛️ Highly Configurable**: Exclude repositories, custom delays, flexible reporting
- **🔄 Fallback Mechanisms**: Ensures complete coverage even when filtering fails
## Features
This action generates a report containing:
- Number of issues opened by repository (last 7 days)
- Number of issues closed by repository (last 7 days)
- Number of PRs merged by repository (last 7 days)
- Summary totals across all repositories
### Efficiency Features
- **Smart repository filtering**: Uses GitHub Search API to identify repositories with recent activity (commits in the last 7 days) before checking for issues and PRs
- **Fallback mechanism**: If no repositories are found with recent commits, falls back to checking all organization repositories to ensure complete coverage
- **Activity-based reporting**: Only includes repositories with actual activity in the generated report
- **Rate limit handling**: Automatically retries on rate limit errors with exponential backoff, and provides clear warnings when data is incomplete
- **Configurable delays**: Optional delays between API calls to reduce rate limit pressure
## Usage
```yaml
- name: Generate weekly report
uses: QuantEcon/action-weekly-report@v1
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
organization: 'QuantEcon'
output-format: 'markdown'
exclude-repos: 'lecture-python.notebooks,auto-updated-repo'
api-delay: '1' # Add 1 second delay between API calls to avoid rate limits
```
## Inputs
| Input | Description | Required | Default |
|-------|-------------|----------|---------|
| `github-token` | GitHub token with access to the organization | Yes | - |
| `organization` | GitHub organization name | No | `QuantEcon` |
| `output-format` | Output format (`markdown` or `json`) | No | `markdown` |
| `exclude-repos` | Comma-separated list of repository names to exclude from the report | No | `''` |
| `api-delay` | Delay in seconds between API calls to avoid rate limits (0 = no delay) | No | `0` |
## Outputs
| Output | Description |
|--------|-------------|
| `report-content` | The full generated report content |
| `report-summary` | A brief summary of the report metrics |
## Permissions
The GitHub token must have read access to:
- Organization repositories
- Repository issues
- Repository pull requests
## Example Workflow
See the [weekly report workflow](../../workflows/weekly-report.yml) for a complete example that runs every Saturday and creates an issue with the report.
## Report Format
The generated markdown report includes:
- A summary table showing activity by repository
- Total counts across all repositories
- Data completeness warnings if API calls failed due to rate limits or other errors
- Report metadata (generation date, period covered)
Only repositories with activity in the reporting period are included in the detailed table.
## Rate Limiting
GitHub's API has rate limits (5000 requests/hour for authenticated requests). For large organizations:
- **Monitor warnings**: The report will include warnings when rate limits are hit
- **Add delays**: Use the `api-delay` parameter to add delays between requests (e.g., `api-delay: '1'` for 1 second delays)
- **Run during off-peak**: Schedule reports during off-peak hours to avoid conflicts with other API usage
- **Incomplete data**: When rate limited, the report will show `0` for affected repositories and include a warning