Skip to content

Latest commit

 

History

History
81 lines (58 loc) · 5.37 KB

github-issues-integration.md

File metadata and controls

81 lines (58 loc) · 5.37 KB
title Implement GitHub Issues with DevIntern Code
sidebarLabel GitHub Issues Integration
description Fetch GitHub issues, track status labels, implement with your coding agent, and open the PR in the same repository.
section Automation
order 5
sidebarHidden true
dateModified 2026-11-26
tags
github
github-issues
devintern/code
integration

Implement GitHub Issues with DevIntern Code

DevIntern Code reads a GitHub issue (body, labels, comments, embedded files), checks that it is clear enough to implement, tracks progress with status labels, runs your coding agent, opens a pull request in the same repository, and posts the result back on the issue.

For PR review automation, use the worker with the relay. Self-hosted webhooks are an advanced alternative: GitHub Webhooks and PR Automation.

Prerequisites

  • @getdevintern/code installed and a Git repository for your project
  • A GitHub token: fine-grained (recommended) limited to this repository with Contents, Pull requests, and Issues set to Read and write and Metadata Read, or classic with the repo scope. See Token permissions for the links

Setup

Set in the workspace .env (~/.devintern/.env, written by devintern worker init) or, for one repository, its env file (~/.devintern/env/<repo>.env, created by devintern init):

Variable Required Description
TASK_TRACKER Yes github
GITHUB_TOKEN Yes Personal access token (the same one used for PR creation)
GITHUB_REPO Yes Repository whose issues you implement, as owner/repo. devintern worker init derives it from your origin remote and writes it to the workspace .env, so you only set it by hand for another repository. When it differs from every worker repository, worker init and worker doctor show an info line ("Tickets come from …, PRs go to …"): fine if intended, otherwise a typo to fix
GITHUB_STATUS_LABELS No Comma-separated status labels (e.g. To Do,In Progress,In Review); on each transition the others are removed

GitHub App credentials (GITHUB_APP_ID + private key) cannot replace GITHUB_TOKEN for this tracker. See GitHub authentication.

Run a task

Pass an issue number, #number, or full URL:

devintern 123 --create-pr
devintern https://github.com/acme/webapp/issues/123 --create-pr

Batch runs use GitHub search qualifiers, automatically scoped with repo:owner/repo is:issue (if you add your own repo:, add is:issue too). The first 100 matches run in sequence; GitHub search is limited to 30 requests per minute.

devintern --query "is:open label:bug" --create-pr

Use --skip-clarity-check to skip the feasibility check and --skip-comments to skip comments and label changes. --estimate posts a comment only (GitHub has no estimate field); see Story Points Estimation.

Status mapping

GitHub has no workflow states, so statuses map to labels. Create the labels in the repository, then configure them under [trackers] in ~/.devintern/workspace.toml, keyed by owner/repo. A status of closed or done closes the issue instead.

[trackers.github.projects."acme/webapp"]
in_progress_status = "In Progress"
todo_status = "To Do"
pr_status = "In Review"
Field When it is applied
in_progress_status Implementation starts (after the feasibility check)
pr_status A pull request is created
todo_status The run is incomplete, fails, or hits the turn limit

Worker notes

  • A typical worker query is is:open label:intern. Label transitions do not remove your trigger label, so the worker's local actioned marker is what stops a PR'd issue from being re-implemented. See Tickets already actioned after a PR.
  • devintern worker connect github pairs the repository with the relay for instant PR events.

Troubleshooting

Symptom Fix
Missing required GitHub environment variables Set GITHUB_TOKEN and GITHUB_REPO. An App ID and key are not enough.
Label "In Progress" not found in the repository Create the label (Issues → Labels) or change the names in [trackers]; the error lists existing labels.
Old status labels pile up Set GITHUB_STATUS_LABELS to the full list of status labels.