An open API service indexing awesome lists of open source software.

https://github.com/ai-action/pull-request-review

📝 GitHub Action that reviews PRs with AI.
https://github.com/ai-action/pull-request-review

ai ai-action code-review composite-action github-action github-composite-action large-language-model llm ollama pull-request pull-request-review

Last synced: 4 days ago
JSON representation

📝 GitHub Action that reviews PRs with AI.

Awesome Lists containing this project

README

          

# pull-request-review

[![version](https://img.shields.io/github/release/ai-action/pull-request-review)](https://github.com/ai-action/pull-request-review/releases)
[![test](https://github.com/ai-action/pull-request-review/actions/workflows/test.yml/badge.svg)](https://github.com/ai-action/pull-request-review/actions/workflows/test.yml)
[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)

📝 GitHub Action that reviews pull requests with AI (LLM).

## Quick Start

```yaml
# .github/workflows/pr-review.yml
on: pull_request
jobs:
pr-review:
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
steps:
- name: PR review
uses: ai-action/pull-request-review@v1
```

## Usage

Review PR diff and add a comment:

```yaml
- uses: ai-action/pull-request-review@v1
```

See [action.yml](action.yml).

## Inputs

### `model`

**Optional**: The language [model](https://ollama.com/library) to use. Defaults to [codellama](https://ollama.com/library/codellama):

```yaml
- uses: ai-action/pull-request-review@v1
with:
model: codellama
```

### `prompt`

**Optional**: The input prompt that comes before the PR diff. Defaults to:

```yaml
- uses: ai-action/pull-request-review@v1
with:
prompt: 'Code review the diff:'
```

### `comment-header`

**Optional**: The PR comment title in Markdown. Defaults to:

```yaml
- uses: ai-action/pull-request-review@v1
with:
comment-header: '# Pull Request Review'
```

### `token`

**Optional**: The GitHub token. Defaults to `GITHUB_TOKEN`:

```yaml
- uses: ai-action/pull-request-review@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
```

## License

[MIT](LICENSE)