Skip to content

Commit 03a33cf

Browse files
authored
Update README.md
1 parent 9579582 commit 03a33cf

File tree

1 file changed

+21
-18
lines changed

1 file changed

+21
-18
lines changed

README.md

Lines changed: 21 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ This flow function (or 🤖) will be triggered when a new PR is raised in the de
3939
## Deploy your own code review bot in 3 simple steps
4040

4141
1. Create a bot from a template
42-
2. Configure the bot to review PRs on a specified GitHub repo
43-
3. Authorize [flows.network](https://flows.network/) to access the GitHub repo
42+
2. Add your OpenAI API key
43+
3. Configure the bot to review PRs on a specified GitHub repo
4444

4545
### 0 Prerequisites
4646

@@ -50,37 +50,38 @@ You will also need to sign into [flows.network](https://flows.network/) from you
5050

5151
### 1 Create a bot from a template
5252

53-
[**Just click here**](https://flows.network/flow/createByTemplate/summarize-github-pull-requests)
53+
[**Just click here**](https://flows.network/flow/createByTemplate/Pull%20Request%20Summary%20Bot)
5454

55-
### 2 Configure the bot
55+
Review the `trigger_phrase` variable. It is the magic words you type in a PR comment to manually summon the review bot.
5656

57-
* `github_owner`: GitHub org for the repo *you want to deploy the 🤖 on*.
58-
* `github_repo` : GitHub repo *you want to deploy the 🤖 on*.
59-
60-
> Let's see an example. You would like to deploy the bot to summarize PRs on `WasmEdge/wasmedge_hyper_demo` repo. Here `github_owner = WasmEdge` and `github_repo = wasmedge_hyper_demo`. See an example below.
57+
Click on the "Create and Deploy" button.
6158

62-
[<img width="450" alt="image" src="https://github.com/flows-network/github-pr-summary/assets/45785633/011d1dc9-c540-4318-af57-834d6278c2dc">](https://github.com/flows-network/github-pr-summary/assets/45785633/011d1dc9-c540-4318-af57-834d6278c2dc)
59+
### 2 Add your OpenAI API key
6360

64-
Click on the "Create and deploy" button.
61+
In the next screen, you will set up OpenAI integration. Click on "Connect", enter your key and give it a name.
6562

66-
## 3 Authorize access
63+
[<img width="450" alt="image" src="https://user-images.githubusercontent.com/45785633/222973214-ecd052dc-72c2-4711-90ec-db1ec9d5f24e.png">](https://user-images.githubusercontent.com/45785633/222973214-ecd052dc-72c2-4711-90ec-db1ec9d5f24e.png)
6764

68-
After that, [flows.network](https://flows.network/) will direct you to configure the external services required by your flow function 🤖.
65+
Close the tab and go back to the flow.network page once you are done. Click on "Next".
6966

70-
[<img width="450" alt="image" src="https://user-images.githubusercontent.com/45785633/229329158-5ba162a6-1f06-4851-ad46-583840dd6891.png">](https://user-images.githubusercontent.com/45785633/229329158-5ba162a6-1f06-4851-ad46-583840dd6891.png)
67+
### 3 Configure the bot to access GitHub
7168

72-
For this flow function, we need to configue two integrations.
69+
In this screen, you will tell the bot which GitHub repo it needs to monitor for upcoming PRs to review.
7370

74-
Click on the "Connect" or "+ Add new authentication" button to add your OpenAI API key.
71+
* `github_owner`: GitHub org for the repo *you want to deploy the 🤖 on*.
72+
* `github_repo` : GitHub repo *you want to deploy the 🤖 on*.
7573

76-
[<img width="450" alt="image" src="https://user-images.githubusercontent.com/45785633/222973214-ecd052dc-72c2-4711-90ec-db1ec9d5f24e.png">](https://user-images.githubusercontent.com/45785633/222973214-ecd052dc-72c2-4711-90ec-db1ec9d5f24e.png)
74+
> Let's see an example. You would like to deploy the bot to review code in PRs on `WasmEdge/wasmedge_hyper_demo` repo. Here `github_owner = WasmEdge` and `github_repo = wasmedge_hyper_demo`.
7775
7876
Click on the "Connect" or "+ Add new authentication" button to give the function access to the GitHub repo to deploy the 🤖. You'll be redirected to a new page where you must grant [flows.network](https://flows.network/) permission to the repo.
7977

8078
[<img width="450" alt="image" src="https://github.com/flows-network/github-pr-summary/assets/45785633/6cefff19-9eeb-4533-a20b-03c6a9c89473">](https://github.com/flows-network/github-pr-summary/assets/45785633/6cefff19-9eeb-4533-a20b-03c6a9c89473)
8179

80+
Close the tab and go back to the flow.network page once you are done. Click on "Check".
8281

83-
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, every new commit, as well as magic words (i.e., `trigger_phrase`) in PR comments.
82+
### Wait for the magic!
83+
84+
This is it! You are now on the flow details page waiting for the flow function to build. As soon as the flow's status became `running`, the bot is ready to give code reviews! The bot is summoned by every new PR, every new commit, as well as magic words (i.e., `trigger_phrase`) in PR comments.
8485

8586
[<img width="450" alt="image" src="https://user-images.githubusercontent.com/45785633/229329247-16273aec-f89b-4375-bf2b-4ffce5e35a33.png">](https://user-images.githubusercontent.com/45785633/229329247-16273aec-f89b-4375-bf2b-4ffce5e35a33.png)
8687

@@ -98,10 +99,12 @@ The flows.network platform will automatically detect and rebuild the bot from yo
9899

99100
### Use the bot on multiple repos
100101

101-
You can create a new flow and import the source code repo for the bot (i.e., the repo you cloned from the template). Then, you can use the flow config to specify the `github_owner` and `github_repo` to point to the target repo you need to deploy the bot on. Deploy and authorize access to that target repo.
102+
You can [mannually create a new flow](https://flows.network/flow/new) and import the source code repo for the bot (i.e., the repo you cloned from the template). Then, you can use the flow config to specify the `github_owner` and `github_repo` to point to the target repo you need to deploy the bot on. Deploy and authorize access to that target repo.
102103

103104
You can repeat this for all target repos you would like to deploy this bot on.
104105

106+
> You could have a single flow function repo deployed as the source code for multiple bots. When you update the source code in the repo, and push it to GitHub, it will change the behavior of all the bots.
107+
105108
### Change the magic phrase
106109

107110
Go to the "Settings" tab of the running flow function for the bot, you can update the `trigger_phrase` config. The value of this config is the magic phrase the user will say to trigger a review from a PR comment.

0 commit comments

Comments
 (0)