Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion docs/code/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,18 @@ Set both when you run mention-driven automation and also use GitHub Issues as a

Do not set `GITHUB_APP_ID` without `GITHUB_APP_PRIVATE_KEY_PATH` or `GITHUB_APP_PRIVATE_KEY_BASE64`. The ID alone is ignored for auth, but the worker treats it as "GitHub credentials present."

### Bot mention aliases

Mention matching resolves the bot login from your configured GitHub App. When a relay-managed worker should also react to the DevIntern AI App's identity β€” whose private key stays on DevIntern infrastructure and is never available locally β€” add its login as an alias:

```bash
GITHUB_BOT_ALIASES=devintern-ai
```

The value is a comma-separated list of logins (with or without the `[bot]` suffix). Aliases count everywhere mentions are matched: commented reviews, inline comment scopes, and the `@mention` sweep. A worker connected to the relay (`devintern worker connect`) injects `devintern-ai` automatically; set the variable explicitly when running a custom App alongside it or without the relay.

When a run is triggered by a `devintern-ai` mention, a relay-connected worker also has the relay mark any comments it could not react to locally with a πŸŽ‰ under the DevIntern AI identity, so the addressed-marker exists even when the local credentials cannot react. Failures here are logged and non-fatal; the local reaction remains the primary marker.

### GitHub Personal Access Token

For personal / interactive CLI use, and for `TASK_TRACKER=github`:
Expand Down Expand Up @@ -155,10 +167,11 @@ Both the ID and a private key are required.
2. Set repository permissions:
- **Contents:** Read and write
- **Pull requests:** Read and write
- **Issues:** Read and write
3. Generate and save a private key
4. Install the App on your repositories

> These permissions cover task implementation and PR creation. If you also run the webhook server or mention sweep to auto-address PR feedback, that App needs additional **Pull request review comments** and **Issue comments** permissions plus event subscriptions; see [GitHub Integration](./github-integration.md#update-app-permissions).
> These permissions cover task implementation, PR creation, and the πŸŽ‰ reaction that marks review feedback as addressed. If reactions start failing with a permissions error after a settings change, re-approve the installation β€” already-issued credentials keep working for up to an hour, and unmarked feedback is re-processed on later runs. If you also run the webhook server or mention sweep to auto-address PR feedback, that App needs additional **Pull request review comments** and **Issue comments** permissions plus event subscriptions; see [GitHub Integration](./github-integration.md#update-app-permissions).

For CI/CD environments, you can use a base64-encoded key:

Expand Down
8 changes: 7 additions & 1 deletion packages/code/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -909,7 +909,13 @@ if (process.argv[2] === "init") {
// Import and run address-review
const { addressReview } = await import("./lib/address-review");
try {
await addressReview(prUrl, { noPush, noReply, verbose });
const result = await addressReview(prUrl, { noPush, noReply, verbose });
// Workers read this to follow up (e.g. relay-initiated reactions).
const resultFd = Number(process.env.DEVINTERN_RESULT_FD);
if (Number.isInteger(resultFd) && resultFd >= 3) {
const { writeSync } = await import("fs");
writeSync(resultFd, `${JSON.stringify(result)}\n`);
}
} catch (error) {
// Close any run record addressReview opened before it failed (no-op
// when none is active β€” addressReview also ends runs it completes).
Expand Down
Loading
Loading