Execution Pipeline
Every time the action runs, it executes the following workflow:Pipeline Stages
Configuration Loading
The action loads configuration from workflow inputs and optional YAML config file:See Configuration for all available options.
Repository Fetching & Filtering
The action queries the GitHub REST API and applies filter criteria:Filters include:
- Visibility:
public,private,all, orowned - Min stars: Repos with at least N stars
- Archived/Forks: Include or exclude archived repos and forks
- Regex patterns: Exclude repos matching patterns
- Only repos: Track only specific repositories
src/infrastructure/github/filters.ts:30:Data Branch Initialization
The action uses Git worktrees to manage the data branch separately from the main checkout:The
initializeDataBranch() function (from src/infrastructure/git/worktree.ts:6):- Checks if the data branch exists on remote
- Creates an orphan branch if it doesn’t exist
- Checks out the branch in a separate worktree directory
- Cleans up the worktree when done
The data branch is completely separate from your main branch, ensuring tracking data doesn’t clutter your repository history.
State Comparison
The action deserializes the previous snapshot and computes delta metrics:The comparison produces a See the implementation in
ComparisonResults object with:src/domain/comparison.ts:8.Stargazer Tracking (Optional)
If enabled, the action fetches individual stargazers and identifies new ones:
Stargazer tracking is opt-in via
track-stargazers: true. For large repositories, this can consume significant API quota.Growth Forecast
The action computes 4-week growth forecasts using two methods:Forecast Methods (from
src/domain/forecast.ts:11):- Linear Regression: Fits a line to historical data
- Weighted Moving Average: Applies higher weight to recent changes
Report & Artifact Generation
The action generates multiple output formats:
Written to
Used for email notifications. Includes inline styles and responsive design.
Machine-readable export with columns:
Shields.io-style badge showing total star count.
Generates:
Markdown Report
Markdown Report
README.md in the data branch. Includes summary tables, delta indicators, and embedded chart links.HTML Report
HTML Report
CSV Export
CSV Export
Repository,Stars,Previous,Delta,StatusSVG Badge
SVG Badge
SVG Charts
SVG Charts
star-history.svg- Aggregate star historycomparison.svg- Top repositories comparisonforecast.svg- Growth forecast visualization- Per-repo charts:
{owner}-{repo}.svg
Data Persistence
All artifacts are written to the data branch and committed:Files written to the data branch:
stars-data.json- Historical snapshotsREADME.md- Markdown reportstars-badge.svg- Star count badgestars-data.csv- CSV exportcharts/*.svg- All generated chartsstargazers.json- Stargazer tracking data (if enabled)
Action Outputs
Snapshot Management
The action maintains a rolling history of snapshots instars-data.json:
max-history (default: 52 runs):
src/domain/snapshot.ts:17:
Error Handling
The action wraps execution in try-catch and reports failures:- Invalid or expired GitHub token
- Insufficient permissions
- Network/API errors
- Git push conflicts (rare with orphan branch)
Next Steps
Architecture
Explore the layered architecture and design patterns
Outputs
Learn how to use action outputs in your workflows
Configuration
Configure filtering, charts, and notifications
Data Management
Understand snapshot rotation and manual data management