feat: logins list/default, actions run delete, date filters, label update alias

- fgj logins {list,default}: complementary UI to 'fgj auth'. 'list'
  shows all configured hosts (hostname, user, protocol, default flag,
  match_dirs) with --json. 'default [hostname]' gets or sets which
  host wins in resolution when no other signal is present.
  Adds 'Default bool' field to HostConfig; GetHost consults it between
  match_dirs and the codeberg.org fallback. Multiple defaults tolerated
  with a stderr warning; alphabetical-first wins.

- fgj actions run delete: delete a completed workflow run via raw
  DELETE (SDK v0.23.2 has no DeleteRepoActionRun). Fetches run first
  and refuses to delete non-terminal states unless --force; suggests
  'actions run cancel' for those. Confirmation prompt unless --yes.

- pr list / issue list gain --since and --before date filter flags.
  Accepts YYYY-MM-DD, RFC 3339, YYYY-MM-DD HH:MM:SS, and relative
  deltas (7d, 24h, 2w, 1m — months=30 days). Issues use server-side
  filter via ListIssueOption.Since/Before; PRs fall back to client-side
  (SDK lacks Since/Before on ListPullRequestsOptions).

- fgj label update added as alias for 'fgj label edit' (tea-compat).

All changes:
  cmd/logins.go (new, 140 LOC)
  cmd/actions_run_delete.go (new, ~85 LOC)
  cmd/pr.go, cmd/issue.go (+parseDateArg helper, filter wiring)
  cmd/label.go (1-line alias)
  internal/config/config.go (Default field + DefaultHost method)
  CHANGELOG.md
Built in parallel by three sub-agents; plus the label alias done
serially. go build / go vet / go test -race all clean.
This commit is contained in:
sid 2026-04-19 23:04:33 -06:00
parent d15deaf064
commit 2d69873f3e
7 changed files with 462 additions and 7 deletions

View file

@ -48,9 +48,10 @@ var labelCreateCmd = &cobra.Command{
}
var labelEditCmd = &cobra.Command{
Use: "edit <name>",
Short: "Edit a label",
Long: "Edit an existing label in a repository.",
Use: "edit <name>",
Aliases: []string{"update"},
Short: "Edit a label",
Long: "Edit an existing label in a repository.",
Example: ` # Rename a label
fgj label edit bug --name bugfix