Skip to content

Latest commit

 

History

History
62 lines (44 loc) · 1.29 KB

File metadata and controls

62 lines (44 loc) · 1.29 KB

Auto-Fix Mode

Auto-fix allows Cortex Code to directly commit fixes to the PR branch.

Enable auto-fix

- uses: anthu/cortex-code-action@v0.1.0
  with:
    mode: "fix"
    permissions: "read-write"
    # ...connection params...

Also requires write permission on contents:

permissions:
  contents: write
  pull-requests: write

What gets fixed

The agent only fixes clear, unambiguous issues:

  • Obvious bugs or logic errors
  • Style/formatting issues (if a linter config exists in the repo)
  • Missing null checks or error handling
  • Typos in code or comments

It does not speculatively refactor or restructure code.

Commit attribution

Auto-fix commits are attributed to cortex-code-action[bot].

[cortex-code-action] Auto-fix suggested issues

Combining review and fix

To review on every PR but only auto-fix when explicitly requested:

# Review on every PR
on:
  pull_request:
    types: [opened, synchronize]

# Fix only when @cortex fix is mentioned
  issue_comment:
    types: [created]

# Use mode: auto -- it detects review vs mention from the event
mode: "auto"
permissions: "read-write"

Security note

Even in read-write mode, SQL execution and sensitive file reads remain permanently blocked. The agent can only modify repository code files.