GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — feat(fleet): gh sync verbs for scripted flows (#10973) · developing-today/code@d142839

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • pkgs/fleet
    • crates
      • fleet-registry/src
        • lib.rs
      • fleet/src
        • gh.rs
        • gh_sync.rs
        • main.rs
    • docs
      • verbs.md
  • pm-stack
    • dispatch/src
      • github.ts
    • opencode-claimant
      • claimant.py
      • launch_one.py
      • test_claimant.py
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎pkgs/fleet/crates/fleet-registry/src/lib.rs‎

Copy file name to clipboardExpand all lines: pkgs/fleet/crates/fleet-registry/src/lib.rs
+14-1Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,20 @@ pub const DOMAINS: &[Domain] = &[
321321
capabilities: &[Capability::Gh],
322322
primary: Capability::Gh,
323323
aliases: &[],
324-
subcommands: &["tiers", "cache-serve", "cache-status", "closures"],
324+
subcommands: &[
325+
"tiers",
326+
"cache-serve",
327+
"cache-status",
328+
"closures",
329+
"sync-labels",
330+
"sync-view",
331+
"sync-comment",
332+
"sync-issue-create",
333+
"sync-issue-get",
334+
"sync-labels-add",
335+
"sync-label-ensure",
336+
"sync-issue-close",
337+
],
325338
},
326339
Domain {
327340
name: "bridge",
Collapse file

‎pkgs/fleet/crates/fleet/src/gh.rs‎

Copy file name to clipboardExpand all lines: pkgs/fleet/crates/fleet/src/gh.rs
+33-1Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,7 @@ use crate::gh_cache;
132132
use crate::gh_closure;
133133
use crate::gh_guard;
134134
use crate::gh_metadata;
135+
use crate::gh_sync;
135136
use fleet_config::{Config, DEFAULT_GH_CACHE_PORT};
136137
use fleet_secrets::Resolver;
137138
use std::io::{IsTerminal, Write};
@@ -189,7 +190,20 @@ FLEET_GH_CACHE as a comma list; an address without a port gets port
189190
`fleet gh cache-status` probes the configured daemons. `--cache-addr`
190191
overrides every daemon address for one call; `--no-cache` resolves
191192
in-process. When no daemon answers, the call resolves in-process and
192-
says so on stderr — never silently.";
193+
says so on stderr — never silently.
194+
195+
Sync verbs (code#10973, step 2.2 of #9016): the `sync-*` shadow
196+
verbs are the typed Queue/GitHub sync surface for scripted flows
197+
(pm-stack dispatch's fallback, the opencode claimant, job bodies).
198+
Each declares its whole command line, validates it strictly, and
199+
rewrites to the canonical gh call before the guard, closure and
200+
metadata layers run, inheriting the rotation and the retry-safety
201+
rule. `fleet gh sync-labels --repo OWNER/REPO <issue|pr> <n>` prints
202+
an item's label names as JSON; `sync-view` prints labels,state,title
203+
JSON; `sync-comment` posts a comment (`--body` or `--body-file`);
204+
`sync-issue-create`, `sync-issue-get`, `sync-labels-add`,
205+
`sync-label-ensure` and `sync-issue-close` (fleet closure reasons)
206+
cover the issue writes dispatch composes. See gh_sync.rs.";
193207

194208
/// The fleet's GitHub Apps, in rotation order. Each carries its
195209
/// private key (and, except the fleet App whose ID is a public
@@ -1500,6 +1514,24 @@ pub fn run(config: &Config, args: &[String]) -> i32 {
15001514
if args.first().is_some_and(|a| a == "closures") {
15011515
return run_closures(&args[1..]);
15021516
}
1517+
// Sync verbs (#10973, step 2.2 of #9016): strictly-parsed typed
1518+
// verbs that rewrite to the canonical gh call. The rewrite is
1519+
// applied here, before the close guard, the closure layer and
1520+
// the metadata create path parse the arguments, so a sync call
1521+
// inherits every passthrough control — and the rotation below —
1522+
// exactly as the hand-written call it replaces would have.
1523+
let sync_rewrite;
1524+
let args: &[String] = match gh_sync::parse(args) {
1525+
Ok(Some(canonical)) => {
1526+
sync_rewrite = canonical;
1527+
&sync_rewrite
1528+
}
1529+
Ok(None) => args,
1530+
Err(e) => {
1531+
eprintln!("{e}");
1532+
return EXIT_USAGE;
1533+
}
1534+
};
15031535
let guard_intent = match gh_guard::parse(args) {
15041536
Ok(intent) => intent,
15051537
Err(e) => {

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.