{"id":13625853,"url":"https://github.com/nfacha/OpenAI-Gitlab-PR-Review","last_synced_at":"2025-04-16T10:33:25.275Z","repository":{"id":178424999,"uuid":"626612593","full_name":"nfacha/OpenAI-Gitlab-PR-Review","owner":"nfacha","description":"Prototype Gitlab Webook that submits code to OpenAI for review","archived":false,"fork":false,"pushed_at":"2024-05-18T15:45:48.000Z","size":17,"stargazers_count":41,"open_issues_count":0,"forks_count":10,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-08-02T22:20:51.827Z","etag":null,"topics":["ai","chatgpt","codereview","gitlab","openai"],"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/nfacha.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-11T20:23:18.000Z","updated_at":"2024-07-18T07:02:33.000Z","dependencies_parsed_at":"2024-01-14T08:49:12.562Z","dependency_job_id":"5085d0b1-78a1-4d5d-8f26-83267e472fca","html_url":"https://github.com/nfacha/OpenAI-Gitlab-PR-Review","commit_stats":null,"previous_names":["nfacha/openai-gitlab-pr-review"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nfacha%2FOpenAI-Gitlab-PR-Review","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nfacha%2FOpenAI-Gitlab-PR-Review/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nfacha%2FOpenAI-Gitlab-PR-Review/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nfacha%2FOpenAI-Gitlab-PR-Review/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nfacha","download_url":"https://codeload.github.com/nfacha/OpenAI-Gitlab-PR-Review/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223708393,"owners_count":17189771,"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","codereview","gitlab","openai"],"created_at":"2024-08-01T21:02:03.841Z","updated_at":"2024-11-08T15:30:39.103Z","avatar_url":"https://github.com/nfacha.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# AI Code Reviewer\n\nAI Code Reviewer is a Python script that leverages OpenAI's GPT-3.5-turbo to automatically review code changes in GitLab repositories. It listens for merge request and push events, fetches the associated code changes, and provides feedback on the changes in a Markdown format.\n\n## Features\n\n- Automatically reviews code changes in GitLab repositories\n- Provides feedback on code clarity, simplicity, bugs, and security issues\n- Generates Markdown-formatted responses for easy readability in GitLab\n\n## Getting Started\n\n### Prerequisites\n\n- Python 3.8 or higher\n- Docker (optional)\n- An OpenAI API key\n- A GitLab API token\n\n### Installation\n\n1. Clone the repository:\n```\nhttps://git.facha.dev/facha/openai-gitlab-pr-review.git\ncd ai-code-reviewer\n```\n\n2. Install the required Python packages:\n```\npip install -r requirements.txt\n```\n\n3. Create a `.env` file and set the required environment variables:\n```\nOPENAI_API_KEY=\u003cyour OpenAI API key\u003e\nGITLAB_TOKEN=\u003cyour GitLab API token\u003e\nGITLAB_URL=https://gitlab.com/api/v4\nEXPECTED_GITLAB_TOKEN=\u003cyour expected GitLab token\u003e\n```\n4. Run the application:\n```\npython app.py\n```\n\n\n### Docker\n\nAlternatively, you can use Docker to run the application:\n\n1. Build the Docker image:\n```\ndocker-compose build\n```\n2. Run the Docker container:\n```\ndocker-compose up -d\n```\n\n\n## Usage\n\n1. Configure your GitLab repository to send webhook events to the AI Code Reviewer application by following [GitLab's webhook documentation](https://docs.gitlab.com/ee/user/project/integrations/webhooks.html).\n\n2. The AI Code Reviewer application will automatically review code changes in your GitLab repository and provide feedback as comments on merge requests and commit diffs.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnfacha%2FOpenAI-Gitlab-PR-Review","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnfacha%2FOpenAI-Gitlab-PR-Review","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnfacha%2FOpenAI-Gitlab-PR-Review/lists"}