-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
enhancementNew feature or requestNew feature or requestportfolioCross-repo/org-level analytics and engagement trackingCross-repo/org-level analytics and engagement tracking
Description
Portfolio Actions workflow template
Parent: Cross-repo engagement radar epic
Milestone: v0.5.0
Goal
Provide a GitHub Actions workflow that runs ghtraf portfolio collect on a schedule, storing daily snapshots to a gist for the dashboard to read.
Design
Where it runs: A single repo chosen by the user. Recommended locations:
- The user's
.githubprofile repo (if they have one) - A dedicated
my-portfolioorgithub-dashboardrepo - Any existing repo (e.g., github-traffic-tracker itself)
Schedule: Daily (same 3am UTC pattern as traffic-badges.yml, or user-configured)
Workflow template (portfolio-collect.yml):
name: Portfolio Collect
on:
schedule:
- cron: '15 3 * * *' # 3:15 AM UTC daily (offset from traffic collection)
workflow_dispatch: # Manual trigger
jobs:
collect:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with: { python-version: '3.11' }
- run: pip install ghtraf
- run: ghtraf portfolio collect --non-interactive
env:
GH_TOKEN: ${{ secrets.PORTFOLIO_PAT }}Auth requirements
The portfolio collector needs a PAT with:
repo(read access to private repos, if desired)read:org(enumerate org repos)
This is a broader scope than per-repo traffic collection (which uses GITHUB_TOKEN with push access). The ghtraf portfolio setup command (#SUB4) should guide users through creating this PAT.
Relationship to per-repo workflow
- Independent: portfolio workflow runs in one repo; traffic workflow runs in each repo
- Complementary: portfolio shows cross-repo overview; traffic shows per-repo detail
- No conflict: different schedules, different gists, different data
Dependencies
- CLI subcommand (#SUB4) must work in
--non-interactivemode - Storage schema (#SUB2) must support gist-backed mode
ghtrafmust be installable via pip (Separate project phase from PEP 440 pre-release — fix pip install without --pre #52 PEP 440 fix helps here)
Analysis
See 2026-03-21__17-57-11__dev-workflow-process_cross-repo-analytics-extend-vs-separate.md
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestportfolioCross-repo/org-level analytics and engagement trackingCross-repo/org-level analytics and engagement tracking