feat(platform): add setAssignee() to PlatformAdapter (GitHub + ADO)#1413
feat(platform): add setAssignee() to PlatformAdapter (GitHub + ADO)#1413babonet wants to merge 1 commit into
Conversation
🟡 Impact Analysis — PR #1413Risk tier: 🟡 MEDIUM 📊 Summary
🎯 Risk Factors
📦 Modules Affectedroot (1 file)
squad-cli (2 files)
squad-sdk (3 files)
tests (1 file)
|
🛫 PR Readiness Check
PR Scope: 📦🔧 Mixed (product + infrastructure)
|
| Status | Check | Details |
|---|---|---|
| ✅ | Single commit | 1 commit — clean history |
| ✅ | Not in draft | Ready for review |
| ✅ | Branch up to date | Up to date with dev |
| ❌ | Copilot review | No Copilot review yet — it may still be processing |
| ✅ | Changeset present | Changeset file found |
| ✅ | Scope clean | No .squad/ or docs/proposals/ files |
| ✅ | No merge conflicts | No merge conflicts |
| ✅ | Copilot threads resolved | 0 active Copilot thread(s) resolved (4 outdated skipped) |
| ❌ | CI passing | 4 check(s) still running |
Files Changed (7 files, +214 −156)
| File | +/− |
|---|---|
.changeset/forge-set-assignee.md |
+8 −0 |
packages/squad-cli/src/cli/commands/loop.ts |
+1 −0 |
packages/squad-cli/src/cli/commands/watch/index.ts |
+10 −18 |
packages/squad-sdk/src/platform/azure-devops.ts |
+11 −0 |
packages/squad-sdk/src/platform/github.ts |
+13 −0 |
packages/squad-sdk/src/platform/types.ts |
+5 −0 |
test/platform-adapter.test.ts |
+166 −138 |
Total: +214 −156
This check runs automatically on every push. Fix any ❌ items and push again.
See CONTRIBUTING.md and PR Requirements for details.
There was a problem hiding this comment.
Pull request overview
Adds a setAssignee() operation to the PlatformAdapter so assignee changes can be routed through the platform abstraction (GitHub + Azure DevOps) instead of being implemented as inline gh/az branches in CLI code.
Changes:
- Extends
PlatformAdapterwithsetAssignee(workItemId, assignee)and wires implementations for GitHub and Azure DevOps. - Updates the watch command’s
editWorkItemto delegate assignee changes to the adapter. - Adds test coverage for the interface shape and includes a changeset bump (SDK minor, CLI patch).
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
packages/squad-sdk/src/platform/types.ts |
Adds setAssignee() to the platform adapter contract and documents expected behavior. |
packages/squad-sdk/src/platform/github.ts |
Implements GitHubAdapter.setAssignee() via gh issue edit. |
packages/squad-sdk/src/platform/azure-devops.ts |
Implements AzureDevOpsAdapter.setAssignee() via System.AssignedTo. |
packages/squad-cli/src/cli/commands/watch/index.ts |
Replaces inline platform branching with adapter.setAssignee() calls. |
packages/squad-cli/src/cli/commands/loop.ts |
Updates the noop adapter to satisfy the new interface. |
test/platform-adapter.test.ts |
Updates interface conformance mocks and adds a basic interface-shape test for setAssignee. |
.changeset/forge-set-assignee.md |
Records version bumps and describes the new adapter capability. |
aeb751e to
b6d9d84
Compare
Routes assignee changes through the adapter instead of inline gh/az calls in watch. Adds GitHub + ADO impls, refactors editWorkItem, tests + changeset.
b6d9d84 to
969886a
Compare
|
Addressed all four review comments in the latest push (969886a):
Build green, 134 platform tests pass. |
tamirdresher
left a comment
There was a problem hiding this comment.
✅ Approved — clean platform abstraction for setAssignee(). Security review: no new injection vectors (array-based exec, not shell). The TOCTOU race on unassign is harmless (best-effort with try/catch). removeAssignee type change from string→boolean is correct and internal-only. ADO @me no-op is documented and matches prior behavior. Tests cover the contract. Ship it.
|
Thanks Oren! Clean work on the platform abstraction. 🙌 |
Closes part of the ADO-first squad routing gap. Adds setAssignee() to PlatformAdapter so assignee changes route through the platform abstraction instead of inline gh/az branches.
Validation: SKIP_BUILD_BUMP=1 npm run build; vitest platform (135 pass).