Skip to content
play

GitHub Action

CodeMaker Action

v1.5.0 Latest version

CodeMaker Action

play

CodeMaker Action

Integrate CodeMaker directly into Github CI/CD workflow

Installation

Copy and paste the following snippet into your .yml file.

              

- name: CodeMaker Action

uses: codemakerai/[email protected]

Learn more about this action in codemakerai/codemaker-action

Choose a version

codemaker-action

CodeMaker GitHub Action

How to use

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.

Example workflow configuration

The following example workflow includes 3 steps:

  1. Checkout the repository.
  2. Run CodeMaker action to processing file example.java. Generated code will be directly written into this file.
  3. 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

License

MIT License