| 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 |
|
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.
@getdevintern/codeinstalled 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
reposcope. See Token permissions for the links
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.
Pass an issue number, #number, or full URL:
devintern 123 --create-pr
devintern https://github.com/acme/webapp/issues/123 --create-prBatch 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-prUse --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.
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 |
- 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 githubpairs the repository with the relay for instant PR events.
| 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. |