Skip to content
Sign in

pr-watcher

v0.1.0

A thin console sidebar of your open GitHub pull requests — review status, CI checks, comments from people and bots, and the chats each PR was worked on in, kept fresh by observers.

license: Apache-2.0githubpull-requestscicode-reviewchatsconsole-ui

Install

bash
iii call compose::add worker=pr-watcher

Run in your project with the iii engine running. Exact versions are immutable and digest-pinned.

Functions13

pr-watcher::configuration::reload

Function

Internal: apply a saved settings change.

Request
Empty object
Response
  • okbooleanrequired

pr-watcher::list

Function

Every open pull request authored by the GitHub account the github worker is signed in as (all pages, newest activity first), each with review decision, merge conflicts, CI rollup and individual checks, the latest comments, reviews and review threads from people and bots, and the chats it was worked on in (scored, with the reasons). The worker keeps this fresh from observers (finished turns, chat changes, github::pr::* calls) with a 5 minute poll as fallback, so a read is served from memory; refresh: true re-reads GitHub and re-links chats. session_id keeps only the PRs linked to that chat. status reports linking progress and observer health; observe pr-watcher::on-change for updates.

Request
  • involvedboolean

    Also list other people's open PRs the account is involved in: review requested, assigned, reviewed, commented on or mentioned in. Each PR says why in roles.

  • refreshboolean

    Re-read GitHub and repeat the chat search.

  • session_idstring

    Only PRs linked to this chat.

Response
  • fetched_atintegerrequired

    Unix ms of the GitHub read.

  • link_errorstring
  • linkingbooleanrequired
  • loginstringrequired

    The GitHub account the list belongs to.

  • prsobject[]required
    • additionsinteger
    • authorstring
    • basestring
    • branchstringrequired
    • chatsobject[]required

      Chats linked to this PR, best match first.

      • confidencestringrequiredenum high, medium, low
      • reasonsstring[]required
      • scorenumberrequired
      • session_idstringrequired
      • statusstring
      • titlestringrequired
      • updated_atinteger
    • ciobjectrequired
      • checksobject[]required
        Show 3 nested
        • namestringrequired
        • statestringrequiredenum pass, fail, pending, skipped
        • urlstring
      • failedintegerrequired
      • passedintegerrequired
      • pendingintegerrequired
      • skippedintegerrequired
      • statestringrequiredenum pass, fail, pending, none
      • totalintegerrequired
    • commentsobjectrequired
      • botsintegerrequired
      • latestobject[]required
        Show 9 nested
        • atstringrequired
        • authorstringrequired
        • bodystringrequired
        • botbooleanrequired
        • kindstringrequiredenum comment, review, thread
        • pathstring
        • resolvedboolean
        • statestring
        • urlstringrequired
      • totalintegerrequired
      • unresolvedintegerrequired

        Unresolved review threads.

    • conflictsbooleanrequired
    • created_atstring
    • deletionsinteger
    • draftbooleanrequired
    • keystringrequired

      owner/repo#number, lowercase.

    • numberintegerrequired
    • repostringrequired
    • reviewstringrequiredenum approved, changes_requested, review_required, none
    • rolesstring[]

      author, or for someone else's PR any of: review requested, assigned, reviewed, commented, mentioned.

    • titlestringrequired
    • updated_atstring
    • urlstringrequired
  • statusobjectrequired

    What the worker is doing and how it stays fresh.

    • githubobjectrequired
      • errorstring
      • fetched_atinteger
      • reasonstring

        What caused the last read: an observer label, poll, manual or first read.

    • linkobjectrequired

      Chat linking: phase is chats (listing chats), matching (search and working directories), reading (transcripts, read of to_read, current = the chat being read) or done.

      • chatsintegerrequired

        Chats matched (while listing: found so far).

      • currentstring
      • doneinteger

        Matching steps finished.

      • errorstring
      • finished_atinteger
      • linked_prsintegerrequired
      • max_chatsinteger

        The configured limit: the most recent chats that are matched.

      • phasestringenum chats, matching, reading, done
      • readintegerrequired
      • started_atinteger
      • statestringrequiredenum idle, running, failed
      • to_readintegerrequired
      • totalinteger
    • watchobjectrequired

      live is true while every observer is active; otherwise only the poll keeps the list fresh.

      • github_eventsobject

        Events for changes made on GitHub itself, through the github worker PR webhooks. available false means they are not set up and the poll covers GitHub.

        Show 8 nested
        • availableboolean
        • eventsinteger
        • failedobject[]
          Show 2 nested
          • errorstring
          • keystring
        • last_event_atinteger
        • preparinginteger
        • reasonstring
        • totalinteger
        • watchedinteger
      • last_event_atinteger
      • livebooleanrequired
      • next_poll_atinteger
      • poll_msintegerrequired
      • sourcesobject[]required
        Show 7 nested
        • eventsintegerrequired
        • idstringrequired
        • labelstringrequired
        • last_event_atinteger
        • observesstringrequired
        • reasonstring
        • statestringrequired
  • totalintegerrequired

pr-watcher::on-change

Function

Called by pr-watcher whenever its answer or its status changes; observe it instead of polling pr-watcher::list. The event carries the whole status, so progress needs no read; on kind prs or links read pr-watcher::list again.

Request
  • atintegerrequired
  • kindstringrequiredenum progress, prs, links, watch

    progress: only status moved. prs / links: read pr-watcher::list again. watch: an observer changed state.

  • statusobjectrequired

    What the worker is doing and how it stays fresh.

    • githubobjectrequired
      • errorstring
      • fetched_atinteger
      • reasonstring

        What caused the last read: an observer label, poll, manual or first read.

    • linkobjectrequired

      Chat linking: phase is chats (listing chats), matching (search and working directories), reading (transcripts, read of to_read, current = the chat being read) or done.

      • chatsintegerrequired

        Chats matched (while listing: found so far).

      • currentstring
      • doneinteger

        Matching steps finished.

      • errorstring
      • finished_atinteger
      • linked_prsintegerrequired
      • max_chatsinteger

        The configured limit: the most recent chats that are matched.

      • phasestringenum chats, matching, reading, done
      • readintegerrequired
      • started_atinteger
      • statestringrequiredenum idle, running, failed
      • to_readintegerrequired
      • totalinteger
    • watchobjectrequired

      live is true while every observer is active; otherwise only the poll keeps the list fresh.

      • github_eventsobject

        Events for changes made on GitHub itself, through the github worker PR webhooks. available false means they are not set up and the poll covers GitHub.

        Show 8 nested
        • availableboolean
        • eventsinteger
        • failedobject[]
          Show 2 nested
          • errorstring
          • keystring
        • last_event_atinteger
        • preparinginteger
        • reasonstring
        • totalinteger
        • watchedinteger
      • last_event_atinteger
      • livebooleanrequired
      • next_poll_atinteger
      • poll_msintegerrequired
      • sourcesobject[]required
        Show 7 nested
        • eventsintegerrequired
        • idstringrequired
        • labelstringrequired
        • last_event_atinteger
        • observesstringrequired
        • reasonstring
        • statestringrequired
Response
  • atintegerrequired
  • kindstringrequiredenum progress, prs, links, watch

    progress: only status moved. prs / links: read pr-watcher::list again. watch: an observer changed state.

  • statusobjectrequired

    What the worker is doing and how it stays fresh.

    • githubobjectrequired
      • errorstring
      • fetched_atinteger
      • reasonstring

        What caused the last read: an observer label, poll, manual or first read.

    • linkobjectrequired

      Chat linking: phase is chats (listing chats), matching (search and working directories), reading (transcripts, read of to_read, current = the chat being read) or done.

      • chatsintegerrequired

        Chats matched (while listing: found so far).

      • currentstring
      • doneinteger

        Matching steps finished.

      • errorstring
      • finished_atinteger
      • linked_prsintegerrequired
      • max_chatsinteger

        The configured limit: the most recent chats that are matched.

      • phasestringenum chats, matching, reading, done
      • readintegerrequired
      • started_atinteger
      • statestringrequiredenum idle, running, failed
      • to_readintegerrequired
      • totalinteger
    • watchobjectrequired

      live is true while every observer is active; otherwise only the poll keeps the list fresh.

      • github_eventsobject

        Events for changes made on GitHub itself, through the github worker PR webhooks. available false means they are not set up and the poll covers GitHub.

        Show 8 nested
        • availableboolean
        • eventsinteger
        • failedobject[]
          Show 2 nested
          • errorstring
          • keystring
        • last_event_atinteger
        • preparinginteger
        • reasonstring
        • totalinteger
        • watchedinteger
      • last_event_atinteger
      • livebooleanrequired
      • next_poll_atinteger
      • poll_msintegerrequired
      • sourcesobject[]required
        Show 7 nested
        • eventsintegerrequired
        • idstringrequired
        • labelstringrequired
        • last_event_atinteger
        • observesstringrequired
        • reasonstring
        • statestringrequired

pr-watcher::on-source::chat-deleted

Function

Internal: a chat was deleted; schedules a refresh.

Request
Empty object
Response
  • okbooleanrequired

pr-watcher::on-source::chat-meta

Function

Internal: a chat was renamed or moved; schedules a refresh.

Request
Empty object
Response
  • okbooleanrequired

pr-watcher::on-source::github-comment

Function

Internal: github::pr::comment was called; schedules a refresh.

Request
Empty object
Response
  • okbooleanrequired

pr-watcher::on-source::github-create

Function

Internal: github::pr::create was called; schedules a refresh.

Request
Empty object
Response
  • okbooleanrequired

pr-watcher::on-source::github-edit

Function

Internal: github::pr::edit was called; schedules a refresh.

Request
Empty object
Response
  • okbooleanrequired

pr-watcher::on-source::github-event

Function

Internal: a watched pull request changed on GitHub; schedules a refresh.

Request
Empty object
Response
  • okbooleanrequired

pr-watcher::on-source::github-merge

Function

Internal: github::pr::merge was called; schedules a refresh.

Request
Empty object
Response
  • okbooleanrequired

pr-watcher::on-source::github-review

Function

Internal: github::pr::review was called; schedules a refresh.

Request
Empty object
Response
  • okbooleanrequired

pr-watcher::on-source::turns

Function

Internal: a chat turn finished; schedules a refresh.

Request
Empty object
Response
  • okbooleanrequired

pr-watcher::ui-content

Function

Serve this worker’s injectable Console UI assets.

Request
  • pathstringrequired
Response
  • contentstringrequired
  • content_typestringrequired

Search the registry

Find workers, kits and executables, or jump to a page.