We're launching on Product Hunt. Show your support by upvoting us and help us bring our innovative solution to a wider audience. Let's make this launch a success together.
Deploy this function on flows.network, and you will get a GitHub 🤖 to review and summarize Pull Requests. It helps busy open source contributors understand and make decisions on PRs faster! A few examples below!
- [Rust] Improve support for host functions in the WasmEdge Rust SDK
- [bash] Support ARM architecture in the WasmEdge installer
- [C++] Add an eBPF plugin for WasmEdge
Still not convinced? See "potential problems 1" in this review, it identified an inefficient Rust implementation of an algorithm. 🤯
This flow function (or 🤖) will be triggered and executed when a new PR is raised in the designated GitHub repo. It can also be triggered again when someone says a magic "trigger phrase" in the PR's comments section. Once triggered, the flow function collects the content in the PR, and asks ChatGPT/4 to review and summarize it. The result is then posted back to the PR as a comment. The flow functions are written in Rust and runs in hosted WasmEdge Runtimes on flows.network.
The GitHub repo is connected to the flow function via the flows.network platform. The "trigger phrase" can also be configured in flows.network.
Click on the picture above to watch a 3-min tutorial video
You will need to bring your own OpenAI API key. If you do not already have one, sign up here.
You will also need to sign into flows.network from your GitHub account. It is free.
The 🤖 is designed to run on flows.network, a serverless platform for SaaS and AI automation.
Fork this repo into your own GitHub account.
If your OpenAI API key has GPT4 access, you can change
GPT35Turbo
toGPT4
in your fork of the source code. GPT4 provides substantially better code reviews, but it is also 10x more expensive.
Go to flows.network to deploy your own flow function from the forked source code.
- Click on the "Create a Flow" button to start.
- Authenticate the flows.network to access the
github-pr-summary
repo you just forked.
- Click on the "Advanced" link to see more settings. Fill in the following environment variables.
The 5 variables below are defined in the flow function's Rust source code. You can assign their values in the source code in your fork directly and skip the steps below.
login
: Fill in your personal GitHub id here. The GitHub app will act as you when posting reviews.owner
: Fill in the GitHub org for the repo you want to deploy the 🤖 on.repo
: Fill in the GitHub repo you want to deploy the 🤖 on.openai_key_name
: Fill in any name you wish for your OpenAI API key. You will connect this name to the actual key later.trigger_phrase
: Fill in the magic phrase to trigger a review from a PR comment.
Let's see an example. You forked the flow function source code to
my-name/github-pr-summary
and would like to deploy the bot to summarize PRs onmy-company/work-project
repo. Herelogin = my-name
,owner = my-company
andrepo = work-project
.
- Click on the Deploy button.
After that, flows.network will direct you to configure the external services required by your flow function 🤖.
For this flow function, we need to configue two integrations.
- Click on the "Connect" or "+ Add new authentication" button to add your OpenAI API key. You could paste your OpenAI API key here and then give it a name. Note the name here must match the name in the
openai_key_name
environment variable.
- Click on the "Connect" or "+ Add new authentication" button to give the function access to the GitHub repo to deploy the 🤖. That is to give access to the
owner/repo
in the environment variables. You'll be redirected to a new page where you must grant flows.network permission to the repo.
After that, click on the "Check" button to go to the flow details page. As soon as the flow's status became running
, the PR summary GitHub bot is ready to give code reviews! The bot is summoned by every new PR or magic words (i.e., trigger_phrase
) in PR comments.
This flow function is originally created by Jay Chen, and jinser made significant contributions to optimize the event triggers from GitHub.