{"id":30743217,"url":"https://github.com/peterxcli/gh-contribution-graph-action","last_synced_at":"2025-09-04T02:05:25.704Z","repository":{"id":288287888,"uuid":"967490160","full_name":"peterxcli/gh-contribution-graph-action","owner":"peterxcli","description":null,"archived":false,"fork":false,"pushed_at":"2025-05-29T15:33:45.000Z","size":85,"stargazers_count":1,"open_issues_count":2,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-29T16:49:51.697Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/peterxcli.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}},"created_at":"2025-04-16T14:31:22.000Z","updated_at":"2025-05-29T15:33:49.000Z","dependencies_parsed_at":"2025-04-16T22:38:50.587Z","dependency_job_id":"bb6fc272-e617-4ea4-8b70-5d90fcb6943a","html_url":"https://github.com/peterxcli/gh-contribution-graph-action","commit_stats":null,"previous_names":["peterxcli/gh-contribution-histogram-action"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/peterxcli/gh-contribution-graph-action","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peterxcli%2Fgh-contribution-graph-action","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peterxcli%2Fgh-contribution-graph-action/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peterxcli%2Fgh-contribution-graph-action/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peterxcli%2Fgh-contribution-graph-action/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/peterxcli","download_url":"https://codeload.github.com/peterxcli/gh-contribution-graph-action/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peterxcli%2Fgh-contribution-graph-action/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273539317,"owners_count":25123499,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-04T02:00:08.968Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2025-09-04T02:05:24.696Z","updated_at":"2025-09-04T02:05:25.695Z","avatar_url":"https://github.com/peterxcli.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# OSS Contribution Graph Generator\n\nA GitHub Action that generates contribution graph showing the number of pull requests authored and reviewed by a user in specific repositories over time.\n\n## Usage\n\n```yaml\n- uses: peterxcli/gh-contribution-graph-action@v2.0\n  with:\n    targets: 'username@owner/repo [username@owner/repo ...]'\n    github_token: ${{ secrets.GITHUB_TOKEN }}\n    output_dir: 'path/to/output'  # Optional, defaults to current directory\n    exclude_authored_from_reviewed: true  # Optional, defaults to false\n```\n\n### Inputs\n\n- `targets`: Comma-separated list of targets in the format `username@owner/repo`. Multiple targets can be specified with spaces.\n- `github_token`: GitHub token for API access. Required for authentication.\n- `output_dir`: Directory where the generated PNG files will be saved. Optional, defaults to the current directory.\n- `exclude_authored_from_reviewed`: Whether to exclude PRs authored by the user from the reviewed count. Optional, defaults to `false`.\n\n### [Example](https://github.com/peterxcli/peterxcli/blob/ba023f1647814d655845888fb66f904b851300ac/.github/workflows/oss-contribution-graph.yml)\n\n```yaml\nname: OSS Contribution Graph\n\non:\n  schedule:\n    - cron: '0 0 * * *'  # Run on at midnight UTC\n  workflow_dispatch:\n    inputs:\n      targets:\n        description: 'Target repositories and usernames (format: username,owner/repo [username,owner/repo ...])'\n        required: true\n        type: string\n        default: 'peterxcli@apache/ozone, peterxcli@apache/kafka'\n\n      exclude_review:\n        description: 'Exclude review contributions'\n        required: false\n        type: boolean\n        default: false\n\nenv:\n  DEFAULT_TARGETS: 'peterxcli@apache/ozone, peterxcli@apache/kafka'\n  EXCLUDE_REVIEW: 'false'\n\njobs:\n  update-histogram:\n    runs-on: ubuntu-latest\n    steps:\n      - name: Checkout repository\n        uses: actions/checkout@v3\n\n      - name: Generate Contribution Graph\n        uses: peterxcli/gh-contribution-graph-action@2.0\n        with:\n          targets: ${{ github.event.inputs.targets || env.DEFAULT_TARGETS }}\n          github_token: ${{ secrets.GITHUB_TOKEN }}\n          output_dir: 'images'\n          exclude_authored_from_reviewed: ${{ github.event.inputs.exclude_review || env.EXCLUDE_REVIEW }}\n\n      - name: Commit and push updated image\n        run: |\n          git config --global user.name 'GitHub Action'\n          git config --global user.email 'action@github.com'\n          git add images/*.svg\n          git commit -m \"Update PR histogram\" || echo \"No changes to commit\"\n          git push\n        env:\n          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n```\n\n## Output\n\nThe action generates PNG files named in the format:\n`{username}-{repo_owner}-{repo_name}-contribution-graph.svg`\n\nEach graph shows:\n- Number of PRs authored by the user (blue bars)\n- Number of PRs reviewed by the user (red bars)\n- Total counts for both authored and reviewed PRs\n- Monthly breakdown of contributions\n\nExample:\n\n![peterxcli-apache-ozone-contribution-graph](https://raw.githubusercontent.com/peterxcli/peterxcli/refs/heads/main/images/peterxcli-apache-ozone-contribution-graph.svg)\n\n![jason810496-apache-airflow-contribution-graph](https://raw.githubusercontent.com/jason810496/jason810496/refs/heads/main/histograms/jason810496-apache-airflow-contribution-histogram.svg)\n\n## License\n\nThis project is licensed under the MIT License - see the LICENSE file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpeterxcli%2Fgh-contribution-graph-action","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpeterxcli%2Fgh-contribution-graph-action","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpeterxcli%2Fgh-contribution-graph-action/lists"}