Skip to content

feat: ownership resolver chain and issue deduplication #4

@shouze

Description

@shouze

Summary

Pluggable resolver chain for automatic assignee detection, and deduplication helper to avoid creating duplicate dispatch issues.

Tasks

  • src/core/ownership.ts
    • Resolver chain: teamsResolver → codeownersResolver → mappingResolver → fallbackResolver
    • resolveOwners(ctx, chain?) — first non-null result wins
    • External mapping: centralRepo/.github-issue-ops/owners.json
  • src/core/dedup.ts
    • findExistingDispatchIssue(token, owner, repo, epicUrl) — search query: repo:… label:github-issue-ops in:body {epicUrl} is:open
    • buildDedupMap(token, org, repos, epicUrl) — batch lookup

Resolver priority

  1. GitHub org teams matching configured teamPrefixes
  2. CODEOWNERS catch-all rules (* or /)
  3. JSON mapping in central repo
  4. Fallback → empty []

Acceptance criteria

  • Unit tests in src/core/ownership.test.ts and src/core/dedup.test.ts pass
  • Resolver chain stops at the first non-null result
  • Dedup returns null when no issue matches

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions