Skip to content

armgit / orca

Public Imported from GitHub
0

Orca is the place for working with a fleet of agents (e.g. Grok Bot, Claude Code). Run any coding agent with your own subscription. Available on desktop, mobile and remote runtime.

571 B
Raw Blame
import { parseGitHubIssueOrPRLink } from './github-links'

export type GitHubWorkItemIdentity = {
  type: 'issue' | 'pr'
  number: number
}

export function resolveGitHubWorkItemIdentity(item: {
  type: 'issue' | 'pr'
  number: number
  url?: string | null
}): GitHubWorkItemIdentity {
  const link = item.url ? parseGitHubIssueOrPRLink(item.url) : null
  if (link) {
    // Pasted URL paths express user intent and override stale cached issue/PR classification.
    return { type: link.type, number: link.number }
  }
  return { type: item.type, number: item.number }
}