diff --git a/.github/workflows/alibabacloud.yml b/.github/workflows/alibabacloud.yml new file mode 100644 index 00000000..c35e3659 --- /dev/null +++ b/.github/workflows/alibabacloud.yml @@ -0,0 +1,39 @@ +name: OpenAI Reviewer + +permissions: + contents: read + pull-requests: write + +on: + pull_request_target: + types: [opened, synchronize, reopened] + pull_request_review_comment: + types: [created] + +concurrency: + group: + ${{ github.repository }}-${{ github.event.number || github.head_ref || + github.sha }}-${{ github.workflow }}-${{ github.event_name == + 'pull_request_review_comment' && 'pr_comment' || 'pr' }} + cancel-in-progress: ${{ github.event_name != 'pull_request_review_comment' }} + +jobs: + review: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + with: + repository: ${{github.event.pull_request.head.repo.full_name}} + ref: ${{github.event.pull_request.head.ref}} + submodules: false + - uses: ./ + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} + with: + debug: true + review_comment_lgtm: false + openai_heavy_model: gpt-4 + path_filters: | + !dist/** + !**/*.lock diff --git a/.github/workflows/deno.yml b/.github/workflows/deno.yml new file mode 100644 index 00000000..49e8fada --- /dev/null +++ b/.github/workflows/deno.yml @@ -0,0 +1,36 @@ +name: OpenAI Reviewer + +permissions: + contents: read + pull-requests: write + +on: [push] + + +concurrency: + group: + ${{ github.repository }}-${{ github.event.number || github.head_ref || + github.sha }}-${{ github.workflow }}-${{ github.event_name == + 'pull_request_review_comment' && 'pr_comment' || 'pr' }} + cancel-in-progress: ${{ github.event_name != 'pull_request_review_comment' }} + +jobs: + review: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + with: + repository: ${{github.event.pull_request.head.repo.full_name}} + ref: ${{github.event.pull_request.head.ref}} + submodules: false + - uses: ./ + env: + GITHUB_TOKEN: ${{ secrets.GGITHUB_TOKEN }} + OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} + with: + debug: true + review_comment_lgtm: false + openai_heavy_model: gpt-4 + path_filters: | + !dist/** + !**/*.lock diff --git a/README.md b/README.md index fd6496a4..82f6e3f8 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,6 @@ # AI-based PR reviewer and summarizer - +11111 +22222 [![Discord](https://img.shields.io/badge/Join%20us%20on-Discord-blue?logo=discord&style=flat-square)](https://discord.gg/GsXnASn26c) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) [![GitHub](https://img.shields.io/github/last-commit/coderabbitai/ai-pr-reviewer/main?style=flat-square)](https://github.com/coderabbitai/ai-pr-reviewer/commits/main) @@ -43,14 +44,23 @@ configure the required environment variables, such as `GITHUB_TOKEN` and `OPENAI_API_KEY`. For more information on usage, examples, contributing, and FAQs, you can refer to the sections below. -- [Overview](#overview) -- [Professional Version of CodeRabbit](#professional-version-of-coderabbit) -- [Reviewer Features](#reviewer-features) -- [Install instructions](#install-instructions) -- [Conversation with CodeRabbit](#conversation-with-coderabbit) -- [Examples](#examples) -- [Contribute](#contribute) -- [FAQs](#faqs) +- [AI-based PR reviewer and summarizer](#ai-based-pr-reviewer-and-summarizer) + - [Overview](#overview) + - [Reviewer Features:](#reviewer-features) + - [CodeRabbit Pro](#coderabbit-pro) + - [Install instructions](#install-instructions) + - [Environment variables](#environment-variables) + - [Models: `gpt-4` and `gpt-3.5-turbo`](#models-gpt-4-and-gpt-35-turbo) + - [Prompts \& Configuration](#prompts--configuration) + - [Conversation with CodeRabbit](#conversation-with-coderabbit) + - [Ignoring PRs](#ignoring-prs) + - [Examples](#examples) + - [Contribute](#contribute) + - [Developing](#developing) + - [FAQs](#faqs) + - [Review pull requests from forks](#review-pull-requests-from-forks) + - [Inspect the messages between OpenAI server](#inspect-the-messages-between-openai-server) + - [Disclaimer](#disclaimer) ## CodeRabbit Pro diff --git a/testpr.py b/testpr.py new file mode 100644 index 00000000..e69184de --- /dev/null +++ b/testpr.py @@ -0,0 +1,9 @@ + +def add(x, y): + z = x + y + k = 3 + l = 'ff' + return z +if __name__ == "__main__": + r = add(10, 7) + print(r) \ No newline at end of file