Skip to content

feat: label generated PRs via pr_labels (workspace.toml) and PR_LABELS env - #99

Merged
danii1 merged 1 commit into
mainfrom
feature/pr-labels
Aug 28, 2026
Merged

feat: label generated PRs via pr_labels (workspace.toml) and PR_LABELS env#99
danii1 merged 1 commit into
mainfrom
feature/pr-labels

Conversation

@danii1

@danii1 danii1 commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add pr_labels to workspace.toml ([defaults] fleet-wide default, per-[[repos]] override) so fleet-created PRs get labeled automatically
  • buildRepoEnv injects the resolved labels as PR_LABELS into every task/automation subprocess for that repo
  • PRManager picks up PR_LABELS (comma-separated) — so single-repo CLI users can also set it in .devintern-code/.env
  • GitHubPRClient applies labels via POST /repos/{owner}/{repo}/issues/{n}/labels after creation and on the 422 already-exists idempotent path; best-effort (warns, never fails the run). GitHub only — Bitbucket has no PR label API

Notes

  • Deliberately no CLI flag: labels are automation/fleet policy, so they live in workspace.toml / env
  • Settings.json untouched (tracker-side state stays there; PR labels are repo-side)
  • workspace init scaffold documents the new key

Testing

  • bun run test: 1018 pass (new tests for config parsing/inheritance/validation, buildRepoEnv injection + precedence, label application incl. 422 path and best-effort failure)
  • format / lint / typecheck green via lefthook

@danii1
danii1 merged commit b9da674 into main Aug 28, 2026
1 check passed
@danii1
danii1 deleted the feature/pr-labels branch August 28, 2026 14:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant