Skip to content

Commit 30fe807

Browse files
committed
Add READMEs to all sub-actions
1 parent a7e39dd commit 30fe807

File tree

5 files changed

+102
-19
lines changed

5 files changed

+102
-19
lines changed

README.md

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,10 @@ on: [pull_request]
2020
jobs:
2121
codeball_job:
2222
runs-on: ubuntu-latest
23-
name: Run Codeball
23+
name: Codeball
2424
steps:
25-
- name: Codeball AI Actions
25+
- name: Codeball
2626
uses: sturdy-dev/codeball-action@v2
27-
# with:
28-
# do-label: "true" # Configure if the action should label approved contributions
29-
# label-name: "codeball:approved" # Configure the label name to set if Codeball approves the contribution
30-
# do-approve: "true" # Configure if the action should approve PRs that have been approved by Codeball
3127
```
3228
3329
2. 🎉 That's it! Codeball will now run on your pull requests, and will pre-approve your PR if it's a good one!
@@ -36,19 +32,12 @@ jobs:
3632
3733
Codeball Actions are built on multiple smaller building-blocks, that are heavily configurable through GitHub Actions.
3834
39-
The Codeball sub-actions are:
40-
41-
* Baller – Triggers new Codeball Jobs
42-
* Status – Waits for the the Codeball result
43-
* Approver – Approves PRs
44-
* Labeler – Adds labels to PRs
45-
4635
### Example: "Dry-run" mode, labels all PRs with the Codeball Result
4736
4837
<details>
49-
<summary>examples/codeball-dry-run.yml</summary>
38+
<summary>codeball-dry-run.yml</summary>
5039
51-
```
40+
```yaml
5241
on: [pull_request]
5342

5443
permissions:
@@ -98,9 +87,9 @@ jobs:
9887
### Example: Approve only (no labels)
9988

10089
<details>
101-
<summary>examples/codeball-approve.yml</summary>
90+
<summary>codeball-approve.yml</summary>
10291

103-
```
92+
```yaml
10493
on: [pull_request]
10594

10695
permissions:
@@ -141,9 +130,9 @@ jobs:
141130
### Example: Filter files (run only for PRs modifying a single service)
142131
143132
<details>
144-
<summary>examples/codeball-filter-files.yml</summary>
133+
<summary>codeball-filter-files.yml</summary>
145134
146-
```
135+
```yaml
147136
on:
148137
pull_request:
149138
# Run Codeball only if files under "/web/" has been modified (and no other files)
@@ -187,6 +176,16 @@ jobs:
187176
```
188177
</details>
189178
179+
180+
## Building Blocks
181+
182+
The Codeball sub-actions are:
183+
184+
* `sturdy-dev/codeball-action/baller/@v2` – Triggers new Codeball Jobs
185+
* `sturdy-dev/codeball-action/status/@v2` – Waits for the the Codeball result
186+
* `sturdy-dev/codeball-action/approver/@v2` – Approves PRs
187+
* `sturdy-dev/codeball-action/labeler/@v2` – Adds labels to PRs
188+
190189
## Troubleshooting
191190

192191
### Permissions

approver/README.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Codeball Approver
2+
3+
This action approves a Pull Request with a message.
4+
5+
# Inputs
6+
7+
## `GITHUB_TOKEN` (optional)
8+
9+
Default to {{ github.token }}. This is the default GitHub token available to actions and is used to run Codeball and to post the result. The default token permissions (https://docs.github.com/en/actions/learn-github-actions/workflow-syntax-for-github-actions#permissions) work fine.
10+
11+
Default: `'${{ github.token }}'`
12+
13+
## `message` (optional)
14+
15+
The message to send in the code review comment.
16+
17+
Default: `"Codeball: LGTM! :+1:"`
18+
19+
# Outputs
20+
21+
_This action has no outputs_

baller/README.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Codeball Baller
2+
3+
This action starts a new asynchronous Codeball Job.
4+
5+
# Inputs
6+
7+
## `GITHUB_TOKEN` (optional)
8+
9+
Default to {{ github.token }}. This is the default GitHub token available to actions and is used to run Codeball and to post the result. The default token permissions (https://docs.github.com/en/actions/learn-github-actions/workflow-syntax-for-github-actions#permissions) work fine.
10+
11+
Default: `'${{ github.token }}'`
12+
13+
# Outputs
14+
15+
## `codeball-job-id`
16+
17+
ID of the Codeball Job

labeler/README.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Codeball Labeler
2+
3+
This action sets labels on the Pull Request.
4+
5+
# Inputs
6+
7+
## `GITHUB_TOKEN` (optional)
8+
9+
Default to {{ github.token }}. This is the default GitHub token available to actions and is used to run Codeball and to post the result. The default token permissions (https://docs.github.com/en/actions/learn-github-actions/workflow-syntax-for-github-actions#permissions) work fine.
10+
11+
Default: `'${{ github.token }}'`
12+
13+
## `name` (required)
14+
15+
The name of the label to set. If no label with this name exists, it will be created.
16+
17+
## `color` (optional)
18+
19+
The color of the label.
20+
21+
Default: `"008E43"`
22+
23+
## `description` (optional)
24+
25+
The description of the label.
26+
27+
Default: `"Codeball"`
28+
29+
# Outputs
30+
31+
_This action has no outputs_

status/README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Codeball Status
2+
3+
This action waits for the Job to complete, and outputs the result.
4+
5+
# Inputs
6+
7+
## `codeball-job-id` (required)
8+
9+
The ID of the Codeball Job created by the Baller Action
10+
11+
# Outputs
12+
13+
## `approved`
14+
15+
If the Codeball approved the contribution (true or false)

0 commit comments

Comments
 (0)