Skip to main content

Module open_prs

Module open_prs 

Source
Expand description

Open PRs in WhoIsWorkingOn (docs/specs/SPEC_AGENT_OVERLAP_AWARENESS_2026_10_10.md §3.5). They come from GitHub, so they cover agents on every computer. They are read through this agent’s own gh-agent (srv holds no GitHub credential), credited to the agent named by the <Agent>@<host>: title prefix CI requires, and cached for 2 minutes per repository. A PR without that prefix (a person’s or a bot’s, which the prefix rule exempts) is credited to its GitHub author, with no host.

Structs§

Asked 🔒
What the caller asked, as srv resolved it (asked), plus pr.
OpenPr 🔒
PrMatch 🔒

Constants§

CACHE_TTL 🔒
FILES_NAMED 🔒
Files named in one match’s detail; the rest are counted.
GH_AGENT 🔒
GH_TIMEOUT 🔒
LIST_LIMIT 🔒
gh pr list --limit is a cap on results, not a page size: high enough for every open PR of any repository here.
PR_FIELDS 🔒

Functions§

cache 🔒
files_phrase 🔒
merge_into 🔒
Add matches to body.agents as pr matches: to the local agent of that name when the PR is from this computer, else as an agent of its own (channel: "github").
open_pr 🔒
PR number of repo read on its own (gh pr view), when it is open: for a PR asked about by number that the list didn’t hold.
open_prs 🔒
The repository’s open PRs, from the cache when it is under 2 minutes old.
parse_pr 🔒
One PR of gh’s JSON.
parse_pr_list 🔒
gh pr list --json number,title,headRefName,files,author’s output.
pr_matches 🔒
The open PRs that touch what was asked, each credited to its agent. The caller’s own PRs (same agent and host) are left out. Err when pr names no open PR here.
run_gh_agent 🔒
gh-agent <args>’s output, killed after GH_TIMEOUT.
this_host 🔒
This computer’s name, as the <Agent>@<host> prefix writes it.
title_author 🔒
AgentY@narko: fix(x): … → ("AgentY", "narko").
under 🔒

Type Aliases§

Cache 🔒
Repository → when its PRs were read, and them.