Skip to content

WL-0MM8LWWCD014HTGU: Add assignGithubIssue helper for delegate command#782

Merged
rgardler-msft merged 1 commit intomainfrom
wl-0mm8lwwcd014htgu-assign-github-issue-helper
Mar 2, 2026
Merged

WL-0MM8LWWCD014HTGU: Add assignGithubIssue helper for delegate command#782
rgardler-msft merged 1 commit intomainfrom
wl-0mm8lwwcd014htgu-assign-github-issue-helper

Conversation

@rgardler-msft
Copy link
Copy Markdown
Owner

Summary

  • Adds assignGithubIssueAsync (async with rate-limit retry/backoff) and assignGithubIssue (sync variant) helper functions to src/github.ts that wrap gh issue edit <number> --add-assignee <user>
  • Creates comprehensive unit test suite (tests/github-assign-issue.test.ts) with 11 tests covering success, failure, retry on rate-limit/403, max retry exhaustion, and command construction
  • Foundational building block for the wl github delegate command (WL-0MKYOAM4Q10TGWND)

Changes

  • src/github.ts: Added AssignGithubIssueResult interface, assignGithubIssueAsync(), and assignGithubIssue() functions
  • tests/github-assign-issue.test.ts: New test file with 11 unit tests using mocked child_process.spawn and child_process.execSync

Testing

All 11 new tests pass. Full test suite (1159 tests across 91 files) passes with no regressions.

Work Item

Part of: Delegate to GitHub Coding Agent (WL-0MKYOAM4Q10TGWND)

… helpers

Add new exported functions to src/github.ts that wrap
`gh issue edit --add-assignee` with the existing retry/backoff
infrastructure:

- assignGithubIssueAsync: async variant with rate-limit retry/backoff
  (configurable retries, default 3). Returns { ok, error? } without
  throwing on failure.
- assignGithubIssue: sync variant using runGhDetailed. Returns
  { ok, error? } without throwing on failure.
- AssignGithubIssueResult interface exported for consumers.

Includes 11 unit tests covering success, failure, retry on rate-limit/403,
max retry exhaustion, and command construction verification.
@rgardler-msft rgardler-msft merged commit fe38a07 into main Mar 2, 2026
4 checks passed
@rgardler-msft rgardler-msft deleted the wl-0mm8lwwcd014htgu-assign-github-issue-helper branch March 2, 2026 05:15
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