-
Notifications
You must be signed in to change notification settings - Fork 18
Add Hall of Fame #39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Hall of Fame #39
Changes from 7 commits
580e6ee
cbd1b2b
9adbf2d
7e46f3e
c37ce14
7c7cb8f
c8f221d
0d5a7ce
c1439e7
5b27dff
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,65 @@ | ||||||
| name: Update Contributors Data | ||||||
|
|
||||||
| on: | ||||||
| schedule: | ||||||
| # Run every day at 6 AM UTC | ||||||
| - cron: '0 6 * * *' | ||||||
| workflow_dispatch: # Allow manual triggering | ||||||
| push: | ||||||
| branches: [ main ] | ||||||
| paths: | ||||||
| - 'scripts/fetch-contributors.js' | ||||||
|
|
||||||
| jobs: | ||||||
| update-contributors: | ||||||
| runs-on: ubuntu-latest | ||||||
|
|
||||||
| steps: | ||||||
| - name: Checkout repository | ||||||
| uses: actions/checkout@v4 | ||||||
| with: | ||||||
| token: ${{ secrets.GITHUB_TOKEN }} | ||||||
|
|
||||||
| - name: Setup Node.js | ||||||
| uses: actions/setup-node@v4 | ||||||
| with: | ||||||
| node-version: '18' | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Prefer current LTS Node.js (e.g., 20) instead of 18 to stay on a supported, secure runtime. Prompt for AI agents |
||||||
| cache: 'npm' | ||||||
|
|
||||||
| - name: Install dependencies | ||||||
| run: npm ci | ||||||
|
|
||||||
| - name: Fetch contributors data | ||||||
| env: | ||||||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||||||
| run: | | ||||||
| echo "🚀 Starting contributor data fetch..." | ||||||
| npm run fetch-contributors | ||||||
| echo "✅ Contributor data fetch completed" | ||||||
| - name: Check if contributors data changed | ||||||
| id: verify-changed-files | ||||||
| run: | | ||||||
| if [ -n "$(git status --porcelain)" ]; then | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Change detection is too broad; restrict to src/data/contributors.json to avoid false positives and commit failures. Prompt for AI agents |
||||||
| echo "changed=true" >> $GITHUB_OUTPUT | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Quote $GITHUB_OUTPUT when appending to avoid potential path parsing issues. Prompt for AI agents
Suggested change
|
||||||
| else | ||||||
| echo "changed=false" >> $GITHUB_OUTPUT | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Quote $GITHUB_OUTPUT when appending to avoid potential path parsing issues. Prompt for AI agents
Suggested change
|
||||||
| fi | ||||||
| - name: Commit and push changes | ||||||
| if: steps.verify-changed-files.outputs.changed == 'true' | ||||||
| run: | | ||||||
| git config --local user.email "action@github.com" | ||||||
| git config --local user.name "GitHub Action" | ||||||
| git add src/data/contributors.json | ||||||
| git commit -m "chore: update contributors data $(date +'%Y-%m-%d')" | ||||||
| git push | ||||||
| echo "✅ Contributors data updated and pushed to repository" | ||||||
| - name: Workflow Summary | ||||||
| run: | | ||||||
| if [[ "${{ steps.verify-changed-files.outputs.changed }}" == "true" ]]; then | ||||||
| echo "📊 Contributors data was updated and the site will be redeployed automatically" | ||||||
| else | ||||||
| echo "ℹ️ Contributors data unchanged - no updates needed" | ||||||
| fi | ||||||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,185 @@ | ||||||
| # Contributors Data | ||||||
|
|
||||||
| This project automatically fetches and displays real contributors from the entire `universal-tool-calling-protocol` GitHub organization. | ||||||
|
|
||||||
| ## How it Works | ||||||
|
|
||||||
| 1. **Data Fetching**: The `scripts/fetch-contributors.js` script queries the GitHub API to: | ||||||
| - Get all repositories in the `universal-tool-calling-protocol` organization | ||||||
| - Fetch contributors for each repository | ||||||
| - **Collect detailed activity metrics**: PRs, reviews, recent commits, last activity dates | ||||||
| - Aggregate contribution counts across all repositories | ||||||
| - Enhance data with user profiles from GitHub | ||||||
| - Calculate hybrid impact scores for each contributor | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Documentation claims hybrid scoring while the implementation uses simplified scoring; update wording to prevent confusion. Prompt for AI agents
Suggested change
|
||||||
|
|
||||||
| 2. **Data Processing**: The script transforms GitHub API data into a format suitable for the contributors page, including: | ||||||
| - Automatic role detection based on repository names (TypeScript SDK, Python SDK, etc.) | ||||||
| - **Hybrid impact scoring** combining recent activity, overall contributions, code quality, and multi-project involvement | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This description overstates inputs (code quality, overall contributions); the current implementation uses simplified recent-activity scoring. Prompt for AI agents
Suggested change
|
||||||
| - Status determination based on impact scores and activity recency | ||||||
| - Real GitHub profile images with emoji fallbacks for errors | ||||||
| - Badge assignment for notable contributors based on multiple metrics | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Claims badges are assigned based on multiple metrics, but only a single impact-score-based badge is implemented. Prompt for AI agents |
||||||
|
|
||||||
| 3. **Automatic Updates**: GitHub Actions automatically updates the contributors data: | ||||||
| - **Daily**: Runs at 6 AM UTC every day | ||||||
| - **Manual**: Can be triggered via workflow_dispatch | ||||||
| - **On Changes**: Runs when the fetch script is updated | ||||||
|
|
||||||
| ## Setup | ||||||
|
|
||||||
| ### Environment Variables | ||||||
|
|
||||||
| For local development, you can set a GitHub token to avoid rate limiting: | ||||||
|
|
||||||
| ```bash | ||||||
| export GITHUB_TOKEN=your_github_token_here | ||||||
| npm run fetch-contributors | ||||||
| ``` | ||||||
|
|
||||||
| ### Running Locally | ||||||
|
|
||||||
| ```bash | ||||||
| # Fetch contributors data | ||||||
| npm run fetch-contributors | ||||||
|
|
||||||
| # Build site with fresh data | ||||||
| npm run build | ||||||
|
|
||||||
| # Build without fetching data (faster) | ||||||
| npm run build:fast | ||||||
| ``` | ||||||
|
|
||||||
| ### Manual Setup | ||||||
|
|
||||||
| If you need to run the script manually: | ||||||
|
|
||||||
| ```bash | ||||||
| node scripts/fetch-contributors.js | ||||||
| ``` | ||||||
|
|
||||||
| ## Data Structure | ||||||
|
|
||||||
| The generated `src/data/contributors.json` file contains: | ||||||
|
|
||||||
| ```json | ||||||
| { | ||||||
| "generated_at": "2024-01-01T12:00:00.000Z", | ||||||
| "total_contributors": 25, | ||||||
| "total_contributions": 1500, | ||||||
| "total_impact_score": 3250, | ||||||
| "total_recent_activity": 145, | ||||||
| "scoring_method": "hybrid_impact_score", | ||||||
|
||||||
| "scoring_method": "hybrid_impact_score", | |
| "scoring_method": "simplified_recent_activity", |
h3xxit marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Activity window (last 6 months) conflicts with recency bullets including last year/older; clarify either the window or the weighting to match the algorithm.
Prompt for AI agents
Address the following comment on hall-of-fame-docs.md at line 113:
<comment>Activity window (last 6 months) conflicts with recency bullets including last year/older; clarify either the window or the weighting to match the algorithm.</comment>
<file context>
@@ -0,0 +1,185 @@
+Impact Score = Recent Activity × Recency Factor
+```
+
+Where Recent Activity is the sum of commits across all repositories in the last 6 months.
+
+#### Recency Weighting
</file context>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Badge section suggests several badges exist, but only ⭐ High Contributor is implemented; note planned status to avoid misleading readers.
Prompt for AI agents
Address the following comment on hall-of-fame-docs.md at line 141:
<comment>Badge section suggests several badges exist, but only ⭐ High Contributor is implemented; note planned status to avoid misleading readers.</comment>
<file context>
@@ -0,0 +1,185 @@
+- **Regular contributor**: 20+ impact score or inactive but previously active
+- **New contributor**: <20 impact score
+
+### Enhanced Badge System
+- 🏆 **Top Impact Contributor**: 200+ impact score
+- ⭐ **High Impact Contributor**: 100+ impact score
</file context>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Term "enhanced scoring system" is misleading; it’s the data collection that increases API calls, not the simplified scoring algorithm.
Prompt for AI agents
Address the following comment on hall-of-fame-docs.md at line 171:
<comment>Term "enhanced scoring system" is misleading; it’s the data collection that increases API calls, not the simplified scoring algorithm.</comment>
<file context>
@@ -0,0 +1,185 @@
+## Troubleshooting
+
+### Rate Limiting
+The enhanced scoring system makes significantly more API calls (PRs, commits, reviews per contributor per repo). Without authentication, GitHub API limits to 60 requests/hour. The script includes delays to avoid hitting limits, but **using `GITHUB_TOKEN` is highly recommended** for reasonable execution times.
+
+**Expected Runtime**:
</file context>
| The enhanced scoring system makes significantly more API calls (PRs, commits, reviews per contributor per repo). Without authentication, GitHub API limits to 60 requests/hour. The script includes delays to avoid hitting limits, but **using `GITHUB_TOKEN` is highly recommended** for reasonable execution times. | |
| The data collection process makes significantly more API calls (PRs, commits, reviews per contributor per repo). Without authentication, GitHub API limits to 60 requests/hour. The script includes delays to avoid hitting limits, but **using `GITHUB_TOKEN` is highly recommended** for reasonable execution times. |
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Build instructions are inaccurate: local builds do not auto-fetch, and build:fast is identical to build; clarify CI vs local behavior.
Prompt for AI agents
Address the following comment on hall-of-fame-docs.md at line 185:
<comment>Build instructions are inaccurate: local builds do not auto-fetch, and build:fast is identical to build; clarify CI vs local behavior.</comment>
<file context>
@@ -0,0 +1,185 @@
+4. Check console for error messages
+
+### Build Integration
+The build process automatically fetches fresh data. For faster builds during development, use `npm run build:fast` to skip the data fetch.
</file context>
| The build process automatically fetches fresh data. For faster builds during development, use `npm run build:fast` to skip the data fetch. | |
| In CI, contributors data is updated before the site build; locally, builds use existing data. For faster builds during development, `npm run build:fast` is equivalent to `npm run build`. |
h3xxit marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -6,13 +6,15 @@ | |
| "docusaurus": "docusaurus", | ||
| "start": "docusaurus start", | ||
| "build": "docusaurus build", | ||
| "build:fast": "docusaurus build", | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Script name suggests a faster build but runs the same command as build, which can mislead contributors and CI. Prompt for AI agents |
||
| "swizzle": "docusaurus swizzle", | ||
| "deploy": "docusaurus deploy", | ||
| "clear": "docusaurus clear", | ||
| "serve": "docusaurus serve", | ||
| "write-translations": "docusaurus write-translations", | ||
| "write-heading-ids": "docusaurus write-heading-ids", | ||
| "typecheck": "tsc" | ||
| "typecheck": "tsc", | ||
h3xxit marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| "fetch-contributors": "node scripts/fetch-contributors.js" | ||
| }, | ||
| "dependencies": { | ||
| "@docusaurus/core": "3.8.1", | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing explicit permissions; declare permissions: contents: write to ensure push can succeed and follow least-privilege.
Prompt for AI agents