Completing full GitHub issues
Use the Ona agent to autonomously read from and complete entire GitHub issues in a secure and isolated development environment.
This guide demonstrates how to use the Ona agent to autonomously complete GitHub issues in your Gitpod environment. The Ona agent can take on GitHub issues, create subtasks, break down complex problems, provide status updates, and ultimately complete tasks autonomously in its own secure development environment.
Caption: Video showing Ona creating breaking down an issue in GitHub into sub issues and completing it using the GitHub CLI.
Prerequisites
Before you can use Ona to autonomously complete GitHub issues, you’ll need to set up your development environment with the necessary tools and authentication.
1. Update your Dev Container with GitHub CLI
First, you’ll need to add the GitHub CLI feature to your dev container configuration. Add the following to your .devcontainer/devcontainer.json
or .devcontainer.json
file:
2. Rebuild your container
After updating your dev container configuration, you need to rebuild your container to apply the changes. You can do this in several ways:
Option A: Using VS Code Command Palette
- Open the Command Palette (
Ctrl+Shift+P
orCmd+Shift+P
) - Search for and select
Gitpod: Rebuild Container
Option B: Using the rebuild prompt
VS Code will automatically detect changes to your dev container configuration and show a rebuild prompt notification.
Option C: Using the Gitpod CLI
From your terminal, run:
While the container is rebuilding, you will be disconnected and automatically reconnected when it’s finished. You can inspect the details view to monitor progress and check logs.
3. Configure GitHub authentication
Once your container is rebuilt with the GitHub CLI installed, you need to set up authentication.
Option A: Using existing GitHub App permissions
If your GitHub app already has the necessary permissions, you can reuse the existing GitHub token that Gitpod provides automatically.
Option B: Adding a Personal Access Token (PAT)
If you need additional permissions or want to use a personal access token:
- Navigate to Settings > Secrets in your Gitpod dashboard
- Create a new user secret with the name
GITHUB_TOKEN
- Add your GitHub personal access token as the value
4. Update your setup script
Create or update a setup script that runs when your dev container starts to authenticate with the GitHub CLI using the --with-token
flag:
Make sure to reference this script in your dev container configuration: