-
Notifications
You must be signed in to change notification settings - Fork 1
Initial contributor activity data collection pipeline #1
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
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
be51a52
feat: initial contributor activity data collection pipeline
Piinks bfab715
feat: harden contributor data pipeline with idempotent sync and test …
Piinks 339ae3a
chore: sync contributor activity through 2026-W32
Piinks 6c39948
feat: address review feedback on bot detection, rate limiting, and in…
Piinks 50b7249
chore: sync contributor activity through 2026-W32
Piinks 9912ab0
feat: add logging to silent catch blocks in tooling
Piinks File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,55 @@ | ||
| name: Daily Activity Sync | ||
|
|
||
| on: | ||
| schedule: | ||
| # Run daily at 02:17 UTC (offset from top of hour to avoid high-load queue drops) | ||
| - cron: '17 2 * * *' | ||
| workflow_dispatch: | ||
| inputs: | ||
| days: | ||
| description: 'Number of past days of activity to sync' | ||
| required: false | ||
| default: '7' | ||
|
|
||
| permissions: | ||
| contents: write | ||
|
|
||
| concurrency: | ||
| group: sync-activity | ||
| cancel-in-progress: false | ||
|
|
||
| jobs: | ||
| sync: | ||
| name: Sync Contributor Activity | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||
|
|
||
| - name: Set up Dart SDK | ||
| uses: dart-lang/setup-dart@e51d8e571e22473a2ddebf0ef8a2123f0ab2c02c # v1.7.1 | ||
|
|
||
| - name: Install dependencies | ||
| run: dart pub get | ||
|
|
||
| - name: Run activity sync | ||
| env: | ||
| ORG_READ_TOKEN: ${{ secrets.ORG_READ_TOKEN }} | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| DAYS: ${{ inputs.days || '7' }} | ||
| run: dart run tool/sync_activity.dart --days "$DAYS" | ||
|
|
||
| - name: Commit and push changes | ||
| run: | | ||
| git config user.name "github-actions[bot]" | ||
| git config user.email "github-actions[bot]@users.noreply.github.com" | ||
| git add data/activity/ data/activity_summary.json | ||
| if git diff --staged --quiet; then | ||
| echo "No activity changes to commit." | ||
| else | ||
| git commit -m "chore: sync contributor activity data [skip ci]" | ||
| git pull --rebase origin main || true | ||
| git push | ||
| fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| name: Validate Data Pipeline | ||
|
|
||
| on: | ||
| push: | ||
| branches: [main] | ||
| pull_request: | ||
| branches: [main] | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| concurrency: | ||
| group: validate-${{ github.ref }} | ||
| cancel-in-progress: true | ||
|
|
||
| jobs: | ||
| validate: | ||
| name: Validate Data Pipeline & Tests | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||
|
|
||
| - name: Set up Dart SDK | ||
| uses: dart-lang/setup-dart@e51d8e571e22473a2ddebf0ef8a2123f0ab2c02c # v1.7.1 | ||
|
|
||
| - name: Install dependencies | ||
| run: dart pub get | ||
|
|
||
| - name: Verify code formatting | ||
| run: dart format --output=none --set-exit-if-changed . | ||
|
|
||
| - name: Analyze Dart code | ||
| run: dart analyze | ||
|
|
||
| - name: Run unit test suite | ||
| run: dart test |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| # Dart tool artifacts | ||
| .dart_tool/ | ||
| .packages | ||
| pubspec.lock | ||
|
|
||
| # OS metadata | ||
| .DS_Store | ||
| Thumbs.db |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
I guess this was copied from flutter/flutter and the links didn't work?
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.
Yup. Kevin originally just copied the file over from flutter/flutter when the repo was set up, so the links were all relative.