You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+22-2Lines changed: 22 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,6 +9,9 @@ Codeball is a code review AI which approves Pull Requests that a human would hav
9
9
10
10
The AI identifies and approves safe contributions, so that you get to focus your energy on the tricky ones.
11
11
12
+
* Identifies and **approves** safe contributions
13
+
*_[beta]_ Generates **code suggestions** from comments ([read more](https://codeball.ai/suggester))
14
+
12
15
## GitHub Action
13
16
14
17
The Codeball GitHub Action runs [Codeball](https://codeball.ai/) on all new Pull Requests, and approves the Pull Request ([example](https://github.com/sturdy-dev/codeball-action/pull/7)) if the model classifies it as safe.
@@ -22,7 +25,10 @@ The Codeball GitHub Action runs [Codeball](https://codeball.ai/) on all new Pull
22
25
23
26
```yaml
24
27
name: Codeball
25
-
on: [pull_request]
28
+
on:
29
+
pull_request: {}
30
+
pull_request_review_comment:
31
+
types: [created, edited]
26
32
27
33
jobs:
28
34
codeball_job:
@@ -36,6 +42,7 @@ jobs:
36
42
labelPullRequestsWhenApproved: "true"
37
43
labelPullRequestsWhenReviewNeeded: "false"
38
44
failJobsWhenReviewNeeded: "false"
45
+
codeSuggestionsFromComments: "true"
39
46
```
40
47
41
48
2. 🎉 That's it! Codeball will now run on new Pull Requests, and will approve the PR if it's a good one!
@@ -184,8 +191,9 @@ The Codeball sub-actions are:
184
191
185
192
* [`sturdy-dev/codeball-action/baller/@v2`](./baller/README.md) – Triggers new Codeball Jobs
186
193
* [`sturdy-dev/codeball-action/status/@v2`](./status/README.md) – Waits for the the Codeball result
* [`sturdy-dev/codeball-action/labeler/@v2`](./labeler/README.md) – Adds labels to PRs
196
+
* [`sturdy-dev/codeball-action/suggester/@v2`](./suggester/README.md) – Converts comments to code suggestions
189
197
190
198
## How Codeball works
191
199
@@ -213,6 +221,18 @@ permissions:
213
221
pull-requests: write
214
222
```
215
223
224
+
To allow PR approvals, make sure that **"Allow GitHub Actions to Create and Approve Pull Requests"** is enabled in the repository and organization settings on GitHub (under "Settings > Actions > General").
If you can not (or do not want to) update the org and repo settings for GitHub Actions, install the ["Codeball AI Writer"](https://github.com/apps/codeball-ai-writer) GitHub App on the repository. When installed, Codeball will use the permissions granted via the app instead of the GitHub Actions token.
235
+
216
236
### Forks and public repositories
217
237
218
238
GitHub does not offer (and reasonably so) a way for Pull Requests from a fork to a public repository to run with "write" permissions to the parent repository.
? 'Codeball Labler failed to access GitHub. Install https://github.com/apps/codeball-ai-writer to the base repository to give Codeball permission to label Pull Requests.'
159
-
: 'Codeball Labler failed to access GitHub. Check the "GITHUB_TOKEN Permissions" of this job and make sure that the job has WRITE permissions to Pull Requests.'
166
+
? 'Codeball Labeler failed to access GitHub. Install https://github.com/apps/codeball-ai-writer to the base repository to give Codeball permission to label Pull Requests.'
167
+
: 'Codeball Labeler failed to access GitHub. Check the "GITHUB_TOKEN Permissions" of this job and make sure that the job has WRITE permissions to Pull Requests.'
0 commit comments