{"id":40472585,"url":"https://github.com/botforge-pro/loc-graph-action","last_synced_at":"2026-01-20T18:19:19.316Z","repository":{"id":309115949,"uuid":"1035213409","full_name":"botforge-pro/loc-graph-action","owner":"botforge-pro","description":"GitHub Action that visualizes your codebase growth — counts lines of code per commit and auto-updates an SVG chart you can embed in your README","archived":false,"fork":false,"pushed_at":"2025-09-03T10:23:08.000Z","size":79,"stargazers_count":2,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-03T12:23:44.519Z","etag":null,"topics":["automation","ci-cd","code-metrics","devops","github-actions","lines-of-code","python","svg-chart","visualization"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/botforge-pro.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-08-09T22:36:09.000Z","updated_at":"2025-09-03T10:23:12.000Z","dependencies_parsed_at":null,"dependency_job_id":"3f4772e4-9647-4b4e-925e-a4fad9e2e161","html_url":"https://github.com/botforge-pro/loc-graph-action","commit_stats":null,"previous_names":["botforge-pro/loc-graph-action"],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/botforge-pro/loc-graph-action","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/botforge-pro%2Floc-graph-action","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/botforge-pro%2Floc-graph-action/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/botforge-pro%2Floc-graph-action/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/botforge-pro%2Floc-graph-action/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/botforge-pro","download_url":"https://codeload.github.com/botforge-pro/loc-graph-action/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/botforge-pro%2Floc-graph-action/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28608778,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-20T16:10:39.856Z","status":"ssl_error","status_checked_at":"2026-01-20T16:10:39.493Z","response_time":117,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["automation","ci-cd","code-metrics","devops","github-actions","lines-of-code","python","svg-chart","visualization"],"created_at":"2026-01-20T18:19:16.378Z","updated_at":"2026-01-20T18:19:19.305Z","avatar_url":"https://github.com/botforge-pro.png","language":"Python","readme":"[![Tests](https://github.com/botforge-pro/loc-graph-action/actions/workflows/test.yml/badge.svg)](https://github.com/botforge-pro/loc-graph-action/actions/workflows/test.yml)\n\n# LOC Graph Action\n\nGitHub Action that scans your repository's commit history, calculates lines of code (LOC) for each commit, and produces an SVG chart showing how LOC changes over time. The generated SVG and a JSON cache are automatically committed back to the repository, allowing you to embed the chart directly in your README.\n\n## Quick Setup\n\nCreate a workflow file `.github/workflows/loc-graph.yml`:\n\n```yaml\nname: LOC graph\n\non:\n  schedule:\n    - cron: '0 0 * * *'  # Daily at midnight\n  workflow_dispatch:\n\npermissions:\n  contents: write\n\njobs:\n  build-loc-graph:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/checkout@v4\n        with:\n          fetch-depth: 0\n      - uses: botforge-pro/loc-graph-action@main\n```\n\nAfter the workflow has run, add the following HTML snippet to the end of your README to display the LOC graph with automatic theme switching:\n\n```html\n### Lines of Code Over Time\n\u003cpicture\u003e\n  \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\".github/loc-history-dark.svg\"\u003e\n  \u003csource media=\"(prefers-color-scheme: light)\" srcset=\".github/loc-history-light.svg\"\u003e\n  \u003cimg src=\".github/loc-history.svg\" alt=\"Lines of code over time\"\u003e\n\u003c/picture\u003e\n```\n\n## Advanced Setup\n\n```yaml\nname: LOC graph\n\non:\n\n  # Trigger on every push (mostly for testing)\n  push:\n    branches: [ main, master ]\n  \n  # Trigger daily at midnight (recommended for active projects)\n  schedule:\n    - cron: '0 0 * * *'\n\n  # Allow manual triggering from the Actions tab\n  workflow_dispatch:\n\npermissions:\n  contents: write\n\njobs:\n  build-loc-graph:\n    runs-on: ubuntu-latest\n    steps:\n      - name: Checkout full history\n        uses: actions/checkout@v4\n        with:\n          fetch-depth: 0\n\n      - name: Generate LOC graph\n        uses: botforge-pro/loc-graph-action@main\n        with:\n          output_json: \"docs/data/loc-cache.json\"\n          fallback_theme: dark  # Theme for .github/loc-history.svg\n          date_format: \"%Y-%m-%d\"  # 2024-03-15\n          time_format: \"%I:%M %p\"  # 03:45 PM\n          exclude: \".cache,assets\"  # Additional names to exclude\n```\n\n## Live example\n\nThis repository uses its own action to track LOC over time:\n\n\u003cpicture\u003e\n  \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\".github/loc-history-dark.svg\"\u003e\n  \u003csource media=\"(prefers-color-scheme: light)\" srcset=\".github/loc-history-light.svg\"\u003e\n  \u003cimg src=\".github/loc-history-light.svg\" alt=\"Lines of code over time\"\u003e\n\u003c/picture\u003e\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbotforge-pro%2Floc-graph-action","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbotforge-pro%2Floc-graph-action","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbotforge-pro%2Floc-graph-action/lists"}