Skip to content

Commit 5cd2ac5

Browse files
committed
First version
0 parents  commit 5cd2ac5

File tree

9 files changed

+5611
-0
lines changed

9 files changed

+5611
-0
lines changed

.gitignore

Lines changed: 136 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,136 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
lerna-debug.log*
8+
.pnpm-debug.log*
9+
10+
# Diagnostic reports (https://nodejs.org/api/report.html)
11+
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
12+
13+
# Runtime data
14+
pids
15+
*.pid
16+
*.seed
17+
*.pid.lock
18+
19+
# Directory for instrumented libs generated by jscoverage/JSCover
20+
lib-cov
21+
22+
# Coverage directory used by tools like istanbul
23+
coverage
24+
*.lcov
25+
26+
# nyc test coverage
27+
.nyc_output
28+
29+
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
30+
.grunt
31+
32+
# Bower dependency directory (https://bower.io/)
33+
bower_components
34+
35+
# node-waf configuration
36+
.lock-wscript
37+
38+
# Compiled binary addons (https://nodejs.org/api/addons.html)
39+
build/Release
40+
41+
# Dependency directories
42+
node_modules/
43+
jspm_packages/
44+
45+
# Snowpack dependency directory (https://snowpack.dev/)
46+
web_modules/
47+
48+
# TypeScript cache
49+
*.tsbuildinfo
50+
51+
# Optional npm cache directory
52+
.npm
53+
54+
# Optional eslint cache
55+
.eslintcache
56+
57+
# Optional stylelint cache
58+
.stylelintcache
59+
60+
# Microbundle cache
61+
.rpt2_cache/
62+
.rts2_cache_cjs/
63+
.rts2_cache_es/
64+
.rts2_cache_umd/
65+
66+
# Optional REPL history
67+
.node_repl_history
68+
69+
# Output of 'npm pack'
70+
*.tgz
71+
72+
# Yarn Integrity file
73+
.yarn-integrity
74+
75+
# dotenv environment variable files
76+
.env
77+
.env.development.local
78+
.env.test.local
79+
.env.production.local
80+
.env.local
81+
82+
# parcel-bundler cache (https://parceljs.org/)
83+
.cache
84+
.parcel-cache
85+
86+
# Next.js build output
87+
.next
88+
out
89+
90+
# Nuxt.js build / generate output
91+
.nuxt
92+
dist
93+
94+
# Gatsby files
95+
.cache/
96+
# Comment in the public line in if your project uses Gatsby and not Next.js
97+
# https://nextjs.org/blog/next-9-1#public-directory-support
98+
# public
99+
100+
# vuepress build output
101+
.vuepress/dist
102+
103+
# vuepress v2.x temp and cache directory
104+
.temp
105+
.cache
106+
107+
# vitepress build output
108+
**/.vitepress/dist
109+
110+
# vitepress cache directory
111+
**/.vitepress/cache
112+
113+
# Docusaurus cache and generated files
114+
.docusaurus
115+
116+
# Serverless directories
117+
.serverless/
118+
119+
# FuseBox cache
120+
.fusebox/
121+
122+
# DynamoDB Local files
123+
.dynamodb/
124+
125+
# TernJS port file
126+
.tern-port
127+
128+
# Stores VSCode versions used for testing VSCode extensions
129+
.vscode-test
130+
131+
# yarn v2
132+
.yarn/cache
133+
.yarn/unplugged
134+
.yarn/build-state.yml
135+
.yarn/install-state.gz
136+
.pnp.*

.nvmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
v22.14.0

CONTRIBUTING.md

Whitespace-only changes.

README.md

Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
# CodeBeaver GitHub Action
2+
3+
This action triggers CodeBeaver to generate unit tests for your pull requests automatically. CodeBeaver analyzes your code changes and creates comprehensive test suites, helping maintain high test coverage with minimal effort.
4+
5+
## Features
6+
7+
- Automatically triggers test generation on pull requests
8+
- Uses CodeBeaver's AI-powered analysis to create relevant tests
9+
- Supports all languages and frameworks that CodeBeaver supports
10+
- Integrates seamlessly with GitHub's pull request workflow
11+
12+
## Usage
13+
14+
1. After you [signed up for CodeBeaver](https://app.codebeaver.ai/login), get your CodeBeaver API key from the [Team page](https://app.codebeaver.ai/team).
15+
16+
2. Add the API key to your repository's secrets:
17+
18+
- Go to your repository's Settings
19+
- Navigate to Secrets and Variables > Actions
20+
- Create a new secret named `CODEBEAVER_API_KEY`
21+
22+
3. Create a workflow file (e.g., `.github/workflows/codebeaver.yml`):
23+
24+
```yaml
25+
name: CodeBeaver Test Generation
26+
27+
on:
28+
pull_request:
29+
types: [opened, synchronize, reopened]
30+
31+
jobs:
32+
generate-tests:
33+
runs-on: ubuntu-latest
34+
steps:
35+
- uses: codebeaver-ai/codebeaver-action@v1
36+
with:
37+
api-key: ${{ secrets.CODEBEAVER_API_KEY }}
38+
```
39+
40+
## Inputs
41+
42+
| Input | Description | Required | Default |
43+
| ------------ | ------------------------------- | -------- | ------------------ |
44+
| `api-key` | CodeBeaver API Key | Yes | N/A |
45+
| `repository` | Repository in owner/repo format | No | Current repository |
46+
| `pr-number` | Pull request number | No | Current PR number |
47+
48+
## Example with all options
49+
50+
```yaml
51+
- uses: codebeaver-ai/codebeaver-action@v1
52+
with:
53+
api-key: ${{ secrets.CODEBEAVER_API_KEY }}
54+
repository: "octocat/Hello-World"
55+
pr-number: "123"
56+
```
57+
58+
## Roadmap
59+
60+
- Trigger test generation on push
61+
- Trigger test generation on schedule
62+
- Trigger test generation on comment
63+
64+
## Contributing
65+
66+
Contributions are welcome! Please read our [Contributing Guide](CONTRIBUTING.md) for details on our code of conduct and the process for submitting pull requests.
67+
68+
## License
69+
70+
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
71+
72+
---
73+
74+
# Contributing guidelines
75+
76+
# CONTRIBUTING.md
77+
78+
# Contributing to CodeBeaver GitHub Action
79+
80+
We love your input! We want to make contributing to the CodeBeaver GitHub Action as easy and transparent as possible, whether it's:
81+
82+
- Reporting a bug
83+
- Discussing the current state of the code
84+
- Submitting a fix
85+
- Proposing new features
86+
- Becoming a maintainer
87+
88+
## We Develop with Github
89+
90+
We use GitHub to host code, to track issues and feature requests, as well as accept pull requests.
91+
92+
## We Use [Github Flow](https://guides.github.com/introduction/flow/index.html)
93+
94+
Pull requests are the best way to propose changes to the codebase. We actively welcome your pull requests:
95+
96+
1. Fork the repo and create your branch from `main`.
97+
2. If you've added code that should be tested, add tests.
98+
3. If you've changed APIs, update the documentation.
99+
4. Ensure the test suite passes.
100+
5. Make sure your code lints.
101+
6. Issue that pull request!
102+
103+
## Any contributions you make will be under the MIT Software License
104+
105+
In short, when you submit code changes, your submissions are understood to be under the same [MIT License](http://choosealicense.com/licenses/mit/) that covers the project. Feel free to contact the maintainers if that's a concern.
106+
107+
## Report bugs using Github's [issue tracker](https://github.com/codebeaver-ai/codebeaver-action/issues)
108+
109+
We use GitHub issues to track public bugs. Report a bug by [opening a new issue](https://github.com/codebeaver-ai/codebeaver-action/issues/new); it's that easy!
110+
111+
## License
112+
113+
By contributing, you agree that your contributions will be licensed under its MIT License.
114+
115+
## References
116+
117+
This document was adapted from the open-source contribution guidelines for [Facebook's Draft](https://github.com/facebook/draft-js/blob/a9316a723f9e918afde44dea68b5f9f39b7d9b00/CONTRIBUTING.md).

action.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: "CodeBeaver Test Generator"
2+
description: "Automatically generate unit tests for your pull requests using CodeBeaver"
3+
author: "CodeBeaver"
4+
5+
branding:
6+
icon: "check-circle"
7+
color: "blue"
8+
9+
inputs:
10+
api-key:
11+
description: "CodeBeaver API Key"
12+
required: true
13+
repository:
14+
description: "The repository in owner/repo format"
15+
required: false
16+
default: ${{ github.repository }}
17+
pr-number:
18+
description: "Pull request number"
19+
required: false
20+
default: ${{ github.event.pull_request.number }}
21+
22+
runs:
23+
using: "node20"
24+
main: "dist/index.js"

0 commit comments

Comments
 (0)