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
  • Overview
  • Example
  1. Integrations
  2. GitHub
  3. GitHub Action

Pull Requests

PreviousContinous IntegrationNextGitHub App

Last updated 1 year ago

Note: The Pull Request processing currently is limited only to editing existing code. More complex interactions and features are in development.

Overview

CodeMaker AI code code editing capabilities can used directly from the GitHub Pull Requests. This feature can be enabled after configuring for your GitHub repository.

The action defines the following properties:

  • access-token - GitHub Personal Access Token (PAT).

  • api-key - unique API Key needed to invoke the service. Should be stored as a secret.

The GitHub Action can be triggered upon pull request code review and will process all of the comments automatically.

Example

Create a new GitHub workflow under ./github/workflows named code-review.yml with the following content.

name: Auto update PR based on a comment

on:
  pull_request_review:
    types: [submitted]

concurrency:
  group: ${{ github.workflow }} - ${{ github.event.pull_request.head.ref }}

jobs:
  update_pr_job:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v3
        with:
          ref: ${{ env.HEAD_BRANCH }}
      - name: Code Review Action
        uses: codemakerai/codemaker-pull-request-action@v2.0.0
        with:
          access-token: ${{ secrets.GITHUB_TOKEN }}
          api-key: ${{ secrets.CODEMAKER_API_KEY }}

This will enable the code editing capabilities within GitHub Pull Requests. The workflow will be automatically triggered upon creation of a code review.

CodeMaker Pull Request Action