Documentation
CodeMaker AI
  • Quick start
    • Overview
    • Getting Started
      • Visual Studio Code
      • JetBrains
      • GitHub Action
      • CodeMaker CLI
  • Features
    • Coding Assistant
    • Interactive
      • Autocompletion
      • Inline code generation
      • Code Actions
      • Syntax Autocorrection
    • Batch
      • Code generation
      • Documentation generation
      • Predictive code generation
    • Source Context
    • Source Graph
  • Models
    • Fine-Tunning
  • Knowledge Base
    • Indexes
  • Source Code
    • Repositories
  • Integrations
    • IDE
      • Visual Studio Code
      • JetBrains
    • GitHub
      • GitHub Action
        • Continous Integration
        • Pull Requests
      • GitHub App
    • CLI
    • SDK
      • Go
      • JavaScript
Powered by GitBook
On this page
  1. Quick start
  2. Getting Started

GitHub Action

PreviousJetBrainsNextCodeMaker CLI

Last updated 1 year ago

CodeMaker AI code and documentation generation capabilities can be used in Continous Delivery / Continuous integration workflows. GitHub Actions are a way of integrating the execution of build steps that can be triggered with any pull request and commit being pushed into GitHub repository.

CodeMaker AI offers dedicated that can easily integrated into any workflow. To get started with the CodeMaker AI action open in your browser your repository Settings tab and under Secrets and Variables > Actions add a repository secret with the CodeMaker AI API key.

Next create a new file named codemaker.yaml under .github/workflows directory. In the file add the following configuration:

on: [push]
branches:
  - master

jobs:
  codemakerai_generation_job:
    runs-on: ubuntu-latest
    name: A job to run CodeMaker AI code generation
    steps:
      # To use this repository's private action,
      # you must check out the repository
      - name: Checkout
        uses: actions/checkout@v4
      - name: Code generation
        uses: codemakerai/codemaker-action@v1.5.0
        with:
          api-key: ${{ secrets.CODEMAKER_API_KEY }}
          mode: code
          path: src/main/**/*.java
      - name: Create Pull Request
        uses: peter-evans/create-pull-request@v6
        with:
          commit-message: Code generated by CodeMaker AI
          title: Changes by codemaker-action
          body: This pull request contains code generated by CodeMaker AI.
          branch: codemakerai-generate

The above configuration configures a GitHub Action workflow that is triggered on every code push. The workflow will checkout the source code and execute the CodeMaker AI code generation command across the entire source tree. Once the processing is complete the changes will be committed and submitted as pull requests to the repository for manual review.

Next time a commit is pushed into the master branch CodeMaker AI code generation will be triggered automatically and a pull request is going to be created.

GitHub Action
GitHub Action execution