# Automate GitHub Issue and Pull Request Triage in Lua with Atlas in 2026

> Atlas automates GitHub issue and pull request triage for Lua projects, integrating with `busted`, `luarocks`, and `stylua` for secure, permission-gated responses.

Automate GitHub issue and pull request triage for your Lua projects in 2026 by integrating Atlas directly into your GitHub Actions workflows, ensuring safe, permission-gated responses using your familiar Lua toolchain, including `busted`, `luarocks`, and `stylua`. Atlas provides a first-class GitHub entrypoint that validates inputs and user permissions before any action, offering a practical option for maintaining your Lua codebase.

## Key takeaways

- Atlas provides a dedicated `atlas github` command for secure GitHub Actions integration with Lua projects.
- Atlas enforces `admin` or `write` permissions and requires explicit mentions for trusted user-triggered automation.
- Context overflow in Lua codebases is explicitly handled, listing offending files for clear resolution.
- Atlas deeply understands Lua syntax, `luarocks` dependencies, and integrates with `busted` and `stylua`.
- All Atlas tool calls and code edits are permission-gated and require approval via unified diffs for Lua files.
- Atlas drafts plans in a read-only agent and snapshots changes as git patches for auditable Lua development.

## How to Wire Atlas into a GitHub Workflow for Lua Triage

To automate GitHub issue and pull request triage for your Lua projects, you must wire the `atlas github` command into a GitHub Actions workflow, setting the `MODEL` and `PROMPT` inputs correctly. This ensures Atlas initializes with the right AI model and context, refusing to run if these 2 critical inputs are missing or malformed.

Integrating Atlas into your Lua project's GitHub workflow begins by invoking the `atlas github` command within a GitHub Actions job. This command acts as Atlas's dedicated entrypoint for GitHub events. You must provide the `MODEL` input, specifying the AI model in `provider/model` format (e.g., `ollama/llama3`), and the `PROMPT` input, which supplies the necessary context for specific event types. For instance, a `pull_request` event might require a prompt detailing how Atlas should review Lua code changes. Atlas performs upfront validation, rejecting any run where these essential inputs are incorrect, ensuring a predictable and secure automation pipeline for your Lua codebase.

## Securely Triggering Atlas for Lua Pull Requests and Issues

Atlas ensures secure automation for your Lua projects by enforcing strict trigger conditions, including checking the actor's collaborator permission and requiring a specific mention in comments. This prevents unauthorized or accidental runs, ensuring only trusted users can initiate an Atlas triage process on your Lua issues and pull requests, with a minimum of 1 explicit mention.

Security is paramount when automating responses to GitHub events in a Lua project. Atlas implements robust checks to ensure only authorized actions occur. Before processing any event, Atlas verifies that the triggering actor possesses either `admin` or `write` collaborator permissions on the repository. If the actor lacks these permissions, Atlas refuses to proceed. Furthermore, for comment-triggered events, Atlas enforces that the comment explicitly mentions the configured trigger (e.g., `@atlas triage`), preventing stray comments from inadvertently starting a run. These safeguards are crucial for maintaining the integrity and safety of your Lua codebase, allowing Atlas to respond only when explicitly and securely invoked by a trusted team member.

## Managing Context Overflow in Lua Codebases with Atlas

Atlas explicitly handles context overflow when processing large Lua files or extensive diffs, catching `ContextOverflowError` by name and re-throwing it as a user-friendly message. This message lists the offending files, providing clear guidance on which 1 or more Lua modules contributed to the prompt being too large, preventing silent failures.

When Atlas processes GitHub issues or pull requests, it constructs a prompt that includes relevant code context from your Lua project. In scenarios involving very large Lua modules, extensive diffs, or numerous related files, this context can exceed the AI model's token limit, leading to a `ContextOverflowError`. Atlas is designed to explicitly catch this error by name. Instead of a cryptic failure, it re-throws the error as a clear, actionable message: 'prompt too large'. Crucially, this message includes a list of the specific Lua files that contributed to the overflow. This explicit handling helps Lua developers quickly identify and address the source of the context issue, allowing them to refine the scope or provide more targeted instructions for Atlas's triage efforts.

## Atlas's Deep Understanding of Lua Code and Tooling in 2026

Atlas possesses a deep, native understanding of Lua code, indexing it by AST declarations using tree-sitter and recognizing `luarocks` dependencies. This allows Atlas to perform sophisticated tasks like replacing a global with a local upvalue or adding `busted describe` blocks under `spec/`, ensuring high-quality Lua code interactions in 2026.

Atlas is engineered to work direct with Lua code, offering capabilities that go beyond simple text manipulation. It indexes your Lua codebase by AST (Abstract Syntax Tree) declarations, leveraging tree-sitter for precise structural understanding, not just blind line windows. This enables Atlas to read your module returns, metatables, and the rocks resolved by `luarocks`, providing a comprehensive view of your project's dependencies and structure. For instance, Atlas can intelligently replace a global variable with a local upvalue, improving code hygiene. It can also assist with testing by adding `busted describe` and `it` blocks under your `spec/` directory. Furthermore, Atlas can run `busted` behind a permission prompt to validate changes and apply `stylua` over touched modules to maintain consistent formatting, all while respecting your Lua development workflow.

## Safe and Auditable Automation for Lua Development with Atlas

Atlas ensures safe and auditable automation for Lua development through a multi-stage approval process, including permission-gated tool calls and a read-only plan agent. Every proposed change to your Lua files generates a unified diff for approval, and file changes are snapshotted as git patches, offering 3 layers of review and rollback capability.

Atlas prioritizes safety and transparency in its automated actions on your Lua codebase. Every tool call, whether it's `bash`, `read`, `grep`, or `edit`, is permission-gated against `allow`, `ask`, and `deny` rules, ensuring you retain control over what Atlas can execute. Before making any modifications, Atlas drafts a plan in a read-only plan agent, which it presents for your review and approval. Only after explicit consent does it switch to a build agent to execute the plan. For every file edit, Atlas computes a unified diff, surfacing it for your final approval before writing changes to disk. Additionally, Atlas snapshots file changes as git patches, allowing you to easily diff edits and roll back if necessary. This comprehensive review process provides confidence when automating tasks like running `busted` or `stylua` on your Lua modules.

## Steps

1. Configure your GitHub Actions workflow to trigger on desired events (e.g., `issues`, `pull_request_target`).
2. Add a job step that invokes the `atlas github` command, ensuring `MODEL` is set (e.g., `ollama/llama3`) and `PROMPT` is provided for relevant event types.
3. Ensure the GitHub token used by the workflow has sufficient permissions for Atlas to check the triggering actor's `admin` or `write` collaborator status.
4. Define the trigger phrase Atlas should look for in comments (e.g., `@atlas triage`) to initiate a run, preventing accidental execution.
5. Place your `.lua` modules and `rockspec` files where Atlas can access them, allowing it to read module returns, metatables, and `luarocks` resolved dependencies.
6. Instruct Atlas to perform Lua-specific tasks, such as replacing a global with a local upvalue or adding `busted describe` and `it` blocks under `spec/`.
7. Allow Atlas to run `busted` behind a permission prompt to validate changes, ensuring tests pass before committing.
8. Configure Atlas to run `stylua` over any touched Lua modules, maintaining consistent code formatting across your project.
9. Review the unified diff presented by Atlas for any proposed changes to your Lua files before approving the write operation.

## FAQ

### How does Atlas ensure only trusted users can trigger triage for my Lua project?

Atlas checks the triggering actor's collaborator permission, refusing to run if they lack `admin` or `write` access. Additionally, for comment-triggered events, it requires a specific mention (e.g., `@atlas triage`) to prevent accidental runs on your Lua codebase.

### Can Atlas understand my Lua module dependencies managed by `luarocks`?

Yes, Atlas is designed to read and understand the rocks resolved by `luarocks`, along with your Lua module returns and metatables, providing a comprehensive view of your project's structure for intelligent automation.

### How does Atlas handle large Lua files that might cause context overflow?

Atlas explicitly catches `ContextOverflowError` and re-throws it as a 'prompt too large' message. This message lists the specific Lua files that contributed to the overflow, helping you identify and address the issue directly.

### Will Atlas automatically run `busted` tests or `stylua` formatting on my Lua code?

Atlas can run `busted` tests and `stylua` formatting, but these actions are permission-gated. Atlas will ask for your approval before executing these tools, ensuring you maintain control over your Lua development workflow.

### What safety mechanisms are in place before Atlas modifies my Lua code?

Atlas uses a read-only plan agent to draft changes, asks for approval before switching to a build agent, and presents a unified diff for every proposed Lua file edit. All tool calls are permission-gated, and changes are snapshotted as git patches for rollback.

### Can Atlas help me refactor Lua code, like replacing globals?

Yes, Atlas's deep understanding of Lua's AST allows it to perform sophisticated refactoring tasks, such as replacing a global variable with a local upvalue, improving the quality and maintainability of your Lua code.

### What inputs are required for the `atlas github` command in a Lua project workflow?

The `atlas github` command requires the `MODEL` input in `provider/model` format (e.g., `ollama/llama3`) and the `PROMPT` input for event types that need specific instructions. Atlas will reject runs if these are missing or incorrect.

---

Canonical HTML: https://runatlas.sh/resources/stacks/automate-github-issue-and-pr-triage-in-lua
Source of truth: aeo_pages row `/resources/stacks/automate-github-issue-and-pr-triage-in-lua` (segment: Stacks) (this file is generated from it, never hand-edited).
Licence: Atlas is proprietary with a free core. It is not open source and there is no public source repository.
