{"id":18501062,"url":"https://github.com/sshnaidm/gpt-code-review-action","last_synced_at":"2025-04-09T01:32:11.160Z","repository":{"id":160670475,"uuid":"627461365","full_name":"sshnaidm/gpt-code-review-action","owner":"sshnaidm","description":"Github action for code review in pull requests with OpenAI (GPT)","archived":false,"fork":false,"pushed_at":"2025-03-26T17:33:14.000Z","size":17,"stargazers_count":16,"open_issues_count":3,"forks_count":12,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-08T14:03:49.851Z","etag":null,"topics":["ai","chatgpt","github","github-actions","openai","review"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sshnaidm.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}},"created_at":"2023-04-13T14:11:36.000Z","updated_at":"2025-03-31T13:26:28.000Z","dependencies_parsed_at":"2023-11-08T23:38:22.548Z","dependency_job_id":"e51c234d-6828-4a70-a23f-56547949ad41","html_url":"https://github.com/sshnaidm/gpt-code-review-action","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sshnaidm%2Fgpt-code-review-action","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sshnaidm%2Fgpt-code-review-action/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sshnaidm%2Fgpt-code-review-action/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sshnaidm%2Fgpt-code-review-action/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sshnaidm","download_url":"https://codeload.github.com/sshnaidm/gpt-code-review-action/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247956821,"owners_count":21024610,"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","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":["ai","chatgpt","github","github-actions","openai","review"],"created_at":"2024-11-06T13:51:47.864Z","updated_at":"2025-04-09T01:32:06.149Z","avatar_url":"https://github.com/sshnaidm.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# OpenAI Code Review Action\n\nThis action uses the OpenAI GPT-3 language model to review code changes in a pull request.\n\n## Usage\n\nTo use this action, include it as a step in your workflow, after the checkout step.\n\n```yaml\n\non: [pull_request]\n\njobs:\n  code-review:\n    runs-on: ubuntu-latest\n    permissions:\n      contents: read\n      pull-requests: write\n    steps:\n      # This step checks out a copy of your repository.\n      - uses: actions/checkout@v3\n      # This step references the directory that contains the action.\n      - uses: sshnaidm/gpt-code-review-action@v2.0\n        with:\n          openai-key: ${{ secrets.OPENAI_API_KEY }}\n          # model: 'gpt-4'\n          # max-length: 8000\n          # prompt: 'Only suggest performance improvements for this code.'\n          # post-if-error: false\n\n```\n\nThe action will post the OpenAI review as a comment on the pull request.\n\n### Requierements\n\nTo post comments in Pull Requests, the job requires additional permissions: `pull-requests: write`. However, since this permission implies \"explicit deny,\" we also need to mention the default permission `contents: read`.\n\n### Inputs\n\n`github-token`: The token used to authenticate with the GitHub API (optional, will take a default `${{ github.token }}`).\n\n`model`: The OpenAI language model to use for code review (optional, with a default `gpt-3.5-turbo`).\n\n`openai-key`: The OpenAI API key used for authentication (**required**).\n\n`prompt`: The prompt to use for the analysis (optional, with a default value).\n\n`max-length`: The diff that is send to OpenAI for review is cut off after 4000 characters by default. With this paramter you can adjust this limit.\n\n`post-if-error`: Whether to post a comment if there was an error (optional, with a default `true`).\n\n### Limitations\n\nCurrently, only the first 4000 characters are sent due to OpenAI's limitations. Later, we will send the text in chunks, and each part will be reviewed separately.\n\n## Contributing\n\nContributions to this action are welcome! Please create an issue or pull request in the repository.\n\n## License\n\nThis action is licensed under the Apache 2.0 License. See the LICENSE file for details\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsshnaidm%2Fgpt-code-review-action","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsshnaidm%2Fgpt-code-review-action","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsshnaidm%2Fgpt-code-review-action/lists"}