# Automatic Code Merge Checks Based on Gitea and Ollama (open-webui)
If you need to review your merged code but prefer not to send it to a third party, or if your network environment is offline (unable to connect to third-party platforms), then this project is an ideal choice.
This project integrates Gitea and Ollama (open-webui) to automatically review merged code and push the results as comments to the corresponding merge requests, allowing developers or reviewers to reference them.
- **Description**: The name of the repository, formatted as `owner/repo` (e.g., `actions/checkout`).
- **Default Value**: `${{ github.repository }}` (the name of the current GitHub repository).
2.**REVIEW_PULL_REQUEST**
- **Description**: Specifies whether to compare the records from the beginning of the commit to the latest one; setting it to `false` means that only the most recent commit will be reviewed.
- **Default Value**: `false`.
3.**BASE_REF**
- **Description**: The base branch of the pull request in the current GitHub event.
- **Description**: Personal access token (PAT) used to access the repository. The PAT is configured in the local git configuration, allowing your scripts to run authenticated git commands. The PAT will be removed at the end of the job.
- **Recommendation**: Use a service account with the least permissions necessary when generating a new PAT and select only the minimum required scopes.
- **Documentation Link**: [Learn more about creating and using encrypted secrets](https://help.github.com/en/actions/automating-your-workflow-with-github-actions/creating-and-using-encrypted-secrets).
- **Default Value**: `${{ github.token }}`.
8.**model**
- **Description**: AI model to use for code review.
- **Required**: Yes.
- **Default Value**: `'gemma2:2b'`.
9.**host**
- **Description**: Ollama host address.
- **Required**: Yes.
- **Default Value**: `'http://127.0.0.1:11434'`.
10.**PROMPT_GENRE**
- **Description**: The genre of the prompt to generate.