Files
git-contribution-graph/config/services.yaml
haylan 4ff45b7c46 feat(store): fetch contributions incrementally and persist history in SQLite
Bound each provider's startFetch()/resolveFetch() to an optional
since/until window, wire a SQLite-backed ContributionStore into
ContributionAggregator (fetch only the trailing window past the last
stored date, merge into the store, prune by CONTRIBUTIONS_RETENTION_DAYS),
and add a graph:contributions:refetch command to force a full or ranged
re-fetch in <=365-day chunks. This is the root fix for the full
365-day-refetch timeout that used to hit on every cache miss.
2026-07-12 23:42:41 +02:00

49 lines
1.4 KiB
YAML

parameters:
env(APP_SECRET): ""
env(ALLOWED_HOSTS): ""
env(GITHUB_USER): ""
env(GITHUB_TOKEN): ""
env(GITLAB_USER): ""
env(GITLAB_TOKEN): ""
env(GITLAB_URL): ""
env(GITEA_USER): ""
env(GITEA_TOKEN): ""
env(GITEA_URL): ""
env(CONTRIBUTIONS_RETENTION_DAYS): "0"
services:
_defaults:
autowire: true
autoconfigure: true
public: false
GitContributionGraph\:
resource: "../src/"
exclude:
- "../src/Kernel.php"
_instanceof:
GitContributionGraph\Service\Provider\ProviderInterface:
tags: ["app.provider"]
GitContributionGraph\Service\Provider\GitHubProvider:
arguments:
$username: "%env(GITHUB_USER)%"
$token: "%env(GITHUB_TOKEN)%"
GitContributionGraph\Service\Provider\GitLabProvider:
arguments:
$username: "%env(GITLAB_USER)%"
$token: "%env(GITLAB_TOKEN)%"
$baseUrl: "%env(GITLAB_URL)%"
GitContributionGraph\Service\Provider\GiteaProvider:
arguments:
$username: "%env(GITEA_USER)%"
$token: "%env(GITEA_TOKEN)%"
$baseUrl: "%env(GITEA_URL)%"
GitContributionGraph\Service\ContributionStore:
arguments:
$dbPath: "%kernel.project_dir%/var/data/contributions.db"
$retentionDays: "%env(int:CONTRIBUTIONS_RETENTION_DAYS)%"