@@ -8,6 +8,7 @@ This action triggers CodeBeaver to generate unit tests for your pull requests au
88- Uses CodeBeaver's AI-powered analysis to create relevant tests
99- Supports all languages and frameworks that CodeBeaver supports
1010- Integrates seamlessly with GitHub's pull request workflow
11+ - Configurable action types for different CodeBeaver operations
1112
1213## Usage
1314
@@ -35,17 +36,33 @@ jobs:
3536 -
uses :
codebeaver-ai/[email protected] 3637 with :
3738 api-key : ${{ secrets.CODEBEAVER_API_KEY }}
39+ action-type : " analyze-and-generate"
3840 env :
3941 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
4042` ` `
4143
4244## Inputs
4345
44- | Input | Description | Required | Default |
45- | ------------ | ------------------------------- | -------- | ------------------ |
46- | ` api-key` | CodeBeaver API Key | Yes | N/A |
47- | `repository` | Repository in owner/repo format | No | Current repository |
48- | `pr-number` | Pull request number | No | Current PR number |
46+ | Input | Description | Required | Default |
47+ | ------------- | ------------------------------- | -------- | ------------------ |
48+ | ` api-key` | CodeBeaver API Key | Yes | N/A |
49+ | `action-type` | Type of action to perform | Yes | N/A |
50+ | `repository` | Repository in owner/repo format | No | Current repository |
51+ | `pr-number` | Pull request number | No | Current PR number |
52+
53+ # ## Action Types
54+
55+ The `action-type` parameter determines what operation CodeBeaver will perform :
56+
57+ - ` analyze` - Analyzes your changes and provides tests results and bug detection analysis as a PR comment
58+ - ` analyze-and-generate` - Does everything `analyze` does, plus generates test files and creates a new PR with the changes
59+ - ` dry-run` - Performs analysis and shows what would be generated without making any changes
60+
61+ Each action type provides different levels of automation :
62+
63+ - Use `analyze` when you want CodeBeaver to run existing tests and provide results as a PR comment
64+ - Use `analyze-and-generate` when you want CodeBeaver to run existing tests, generate new tests, and propose them via a new PR
65+ - Use `dry-run` during initial setup or to preview CodeBeaver's analysis
4966
5067# # Example with all options
5168
5572 api-key: ${{ secrets.CODEBEAVER_API_KEY }}
5673 repository: "octocat/Hello-World"
5774 pr-number: "123"
75+ action-type: "analyze-and-generate"
5876 env:
5977 GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6078` ` `
0 commit comments