CodeMaker GitHub Action
This GitHub action takes 3 (required) inputs:
- api-key: Your CodeMaker API Key. For security, please consider using secrets to provide this value.
- mode: CodeMaker generation mode. Currently we support code, docs or unit-tests.
- path: The path of the file to process.
The following example workflow includes 3 steps:
- Checkout the repository.
- Run CodeMaker action to processing file
example.java
. Generated code will be directly written into this file. - Create a pull request for code review.
Full example is available here.
on: [workflow_dispatch]
jobs:
codemakerai_generation_job:
runs-on: ubuntu-latest
name: A job to run codemakerai code generation
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Code generation
uses: codemakerai/[email protected]
with:
api-key: ${{ secrets.CODEMAKER_API_KEY }}
mode: code
path: ./example.java
- name: Create Pull Request
uses: peter-evans/create-pull-request@v6
with:
commit-message: Code generated by codemaker
title: Changes by codemaker-action
body: This pull request contains code generated by codemaker.
branch: codemakerai-generate
MIT License