Commit graph

35 commits

Author SHA1 Message Date
sid
4eeef2ceca feat: pr approve/reject, repo migrate/template, secret stdin fix, docs
- fgj pr approve / pr reject: thin shortcuts over 'pr review --approve'
  and '--request-changes'. Reject requires a body.
- fgj repo migrate: wrap SDK MigrateRepo. Supports git, github, gitlab,
  gitea, gogs services; mirror mode with --mirror-interval; selective
  import (wiki/labels/milestones/issues/PRs/releases/LFS); auth via
  --auth-token or --auth-username/--auth-password. Defaults owner to
  the authenticated user.
- fgj repo create-from-template: wrap SDK CreateRepoFromTemplate with
  fine-grained --with-{content,topics,labels,webhooks,git-hooks,avatar}
  flags. Template is owner/name; new repo defaults to the current user.
- Rework 'fgj actions secret create' input. New cmd/secret_input.go
  resolves values from --body, --body-file (path or '-'), hidden TTY
  prompt via term.ReadPassword, or piped stdin. Trims trailing
  whitespace, rejects empty values. Replaces fmt.Scanln which broke on
  spaces/newlines and echoed input.
- CHANGELOG: v0.4.0 Unreleased section documenting all additions,
  changes, and development items.
- README: updated feature list with new commands.
2026-04-19 22:14:43 -06:00
sid
adccd6f6f7 feat: add webhook, repo delete/search, admin, pr clean/resolve/review-comments
Second pass of tea-parity work:

- fgj webhook {list,create,update,delete}: full CRUD over repo webhooks.
  Create supports all standard hook types (gitea, slack, discord, etc.),
  event selection, content type, secret, branch filter, auth header.
  Update is partial — flags you omit leave existing config unchanged.
- fgj repo delete: type-to-confirm deletion; --yes skips for scripts;
  refuses without a TTY unless --yes is passed.
- fgj repo search: SDK SearchRepos with query, topic/description,
  private/archived, --type (source/fork/mirror), owner, sort/order.
- fgj admin user list: admin-gated user enumeration.
- fgj pr clean: delete the local branch from 'pr checkout'. Refuses
  if the PR is still open (use --force) or if the branch is currently
  checked out.
- fgj pr review-comments: list inline review comments across every
  review on a PR (ListPullReviews + ListPullReviewComments per review).
- fgj pr resolve / unresolve: mark review comments as (un)resolved.
  Uses raw POST since SDK v0.22.1 predates these endpoints; requires
  Forgejo 8.x+ / Gitea 1.22+ server-side.

All share the standard parseRepo + config.Load + NewClientFromConfig
pattern; list commands support --json / --jq.
2026-04-19 22:01:29 -06:00
sid
17ca49d0c5 feat: add branch, notification, org, open, whoami commands
Ports five commands from tea that fgj-sid was missing:

- fgj branch {list,rename,delete} — list branches with protection
  status, rename, and delete with confirmation.
- fgj notification {list,read} — list user notifications (unread by
  default, --all for everything), mark individual threads read.
- fgj org {list,create,delete} — manage organizations on the host.
  Create accepts --description/--full-name/--website/--location and
  --visibility (public/limited/private).
- fgj open [number] — open the repo, issue, or PR in a browser.
  Auto-detects issue-vs-PR via GetIssue. Falls back to printing the
  URL when stdout is not a TTY or --url is passed.
- fgj whoami — display authenticated user + host.

All commands follow the established pattern (parseRepo + config.Load +
api.NewClientFromConfig + ios), support --json where list semantics
apply, and share a new loadClient helper for host-scoped (non-repo)
commands. Tested live against forgejo.zerova.net.

Refs audit recommendation.md §'v0.5.0 — Missing resources'.
2026-04-19 21:27:55 -06:00
sid
d4b5b79541 feat(release): v0.4.0 foundations — ldflags version + goreleaser + CI Go 1.24
- Move version out of cmd/root.go hardcode into an ldflags-injected
  var. Makefile derives from 'git describe --tags --always --dirty';
  plain 'go build' / 'go run' get 'dev'. Release builds will get the
  tag via goreleaser.
- Add .goreleaser.yaml: multi-platform (linux/darwin/windows/freebsd ×
  amd64/arm64/arm) builds with SHA256 checksums, tar.gz/zip archives,
  forgejo release publishing. No GPG/S3 yet — deferred until a key is
  provisioned.
- Add .gitea/workflows/release.yml to run goreleaser on tag push.
  Uses built-in GITEA_TOKEN with override via RELEASE_TOKEN secret.
- Align CI Go version with go.mod (1.24). Previously CI ran 1.21,
  which would have silently missed any 1.22+ feature use.
- Move itchyny/gojq from indirect to direct (it's used in api.go).
  Drop stale x/sys v0.33.0 entry from go.sum.
- Ignore dist/ and bin/ in .gitignore.
- CHANGELOG: document v0.3.1 fix and Unreleased development changes.
2026-04-19 21:04:57 -06:00
sid
a6cf9a7096 chore: bump version to 0.3.1
Some checks failed
CI / lint (push) Has been cancelled
CI / build (push) Has been cancelled
CI / test (push) Has been cancelled
CI / functional (push) Has been cancelled
Restores installability via 'go install @latest'. Prior letter-suffix
tags (v0.3.0a..v0.3.0f) aren't valid semver and were ignored by Go's
module resolver, leaving @latest pointing at v0.3.0 which predates
the module-path migration.
2026-04-19 20:54:45 -06:00
sid
c2251d9932 chore: migrate module path to public org
Some checks failed
CI / lint (push) Has been cancelled
CI / build (push) Has been cancelled
CI / test (push) Has been cancelled
CI / functional (push) Has been cancelled
Move from forgejo.zerova.net/sid/fgj-sid to
forgejo.zerova.net/public/fgj-sid to reflect the new public org.
2026-04-11 10:34:34 -06:00
sid
4669d21dea chore: bump version to 0.3.0e
Some checks are pending
CI / lint (push) Waiting to run
CI / build (push) Waiting to run
CI / test (push) Waiting to run
CI / functional (push) Blocked by required conditions
2026-03-23 12:57:38 -06:00
sid
c293e233d2 feat: add directory-scoped host defaults (match_dirs) and repo list --limit
Some checks are pending
CI / lint (push) Waiting to run
CI / build (push) Waiting to run
CI / test (push) Waiting to run
CI / functional (push) Blocked by required conditions
Add match_dirs field to host config entries for directory-based host
resolution. When no --hostname flag, FGJ_HOST env var, or git remote is
detected, the longest matching directory prefix determines the host.
Symlinks are resolved on both sides for macOS compatibility (/tmp →
/private/tmp). Also adds --limit/-L flag to repo list.
2026-03-23 12:42:24 -06:00
sid
113505de95 feat: v0.3.0d — add PR checks, iostreams, aliases, and broad enhancements
Add PR checks command, iostreams/text packages for colored table output,
top-level run/workflow aliases matching gh CLI structure. Enhance actions,
issues, PRs, releases, repos, labels, milestones, and wiki commands with
improved flags, JSON output, and error handling.
2026-03-23 12:42:24 -06:00
sid
95da06c003 feat: v0.3.0c — add labels, milestones, wiki, issue dependencies
New commands:
- fgj label list/create/edit/delete
- fgj milestone list/view/create/edit/delete
- fgj wiki list/view/create/edit/delete

Enhanced:
- fgj issue edit --add-dependency/--remove-dependency
2026-03-21 21:50:24 -06:00
sid
7ee5a61910 feat: v0.3.0b — add repo edit command, fix repo create --public flag
- Add `fgj repo edit` for changing visibility, description, homepage,
  and default branch on existing repositories
- Fix `repo create --public` flag which was defined but never read
2026-03-21 21:50:24 -06:00
sid
43e43e7024 feat: v0.3.0a — add api command, pr diff/comment/review, structured errors
New commands:
- fgj api: raw REST API passthrough with field inference and path interpolation
- fgj pr diff: view PR diffs with color, --name-only, --stat
- fgj pr comment: add comments to pull requests
- fgj pr review: approve, request changes, or comment on PRs

Agentic enhancements:
- --json-errors flag for structured JSON error output on stderr
- APIError type wrapping HTTP status codes for machine consumption
- Error codes: auth_required, not_found, api_error, invalid_input, etc.

Docs updated for forgejo.zerova.net/sid/fgj-sid fork.
2026-03-21 21:50:24 -06:00
sid
50191cc542 feat: add PR diff, PR review, and structured error handling commands 2026-03-21 21:50:24 -06:00
Romain Bertrand
a43a79d78f feat: implement repo create command 2026-03-13 17:44:44 +01:00
Romain Bertrand
0b8f67e438 feat: allow tags passing when creating/editing an issue
resolves #27
2026-02-20 17:41:45 +01:00
Romain Bertrand
1420b89fed fix: correctly build the jobs logs url
unfortunately, this is available in gitea, not yet backported to forgejo
2026-01-28 15:16:25 +01:00
Romain Bertrand
a7e5dc5798 lint: find a bunch of issues 2026-01-28 15:16:25 +01:00
Romain Bertrand
4c6de3ad2e feat: add actions workflow enable and disable 2026-01-18 13:11:41 +01:00
Romain Bertrand
c2ee338f1c feat: add actions run watch rerun and cancel 2026-01-18 13:11:41 +01:00
Romain Bertrand
3ccef4e1c6 feat: add json output for list and view commands 2026-01-18 13:11:41 +01:00
Romain Bertrand
fe23f2fce3 feat: add auth logout and token helpers 2026-01-18 13:11:40 +01:00
Romain Bertrand
7bb540bd11 feat: add completion and manpage commands 2026-01-18 13:11:40 +01:00
Romain Bertrand
79df4eb780 feat: implement workflow list/view/run 2026-01-16 10:52:15 +01:00
Romain Bertrand
900bd4ea97 feat: allow passing a comment when closing an issue 2026-01-16 10:03:49 +01:00
Romain Bertrand
fc699e9718 release: prepare for v0.2.0 2026-01-09 13:49:41 +01:00
Romain Bertrand
c0baf4fa3b feat: auto detect hostname 2026-01-06 12:24:07 +01:00
Romain Bertrand
36a473a711 feat: releases 2026-01-05 12:57:37 +01:00
Romain Bertrand
9251487e56 feat: issue edit 2026-01-03 11:49:34 +01:00
Romain Bertrand
3bc37d32a6 feat: "pr create --assignee" implementation 2025-12-24 10:15:50 +01:00
Romain Bertrand
c689c7d171 enhance: clone feature 2025-12-16 12:46:31 +01:00
Romain Bertrand
8db012cb7a feat: actions support 2025-12-09 13:41:08 +01:00
Romain Bertrand
ca17526594 feat: basic initial support for actions 2025-12-08 11:16:35 +01:00
Romain Bertrand
aa2be8587a feat: optional -R when in a git repo 2025-12-08 10:29:32 +01:00
Romain Bertrand
1d94431825 lint: fix linting issues 2025-12-08 10:00:50 +01:00
Romain Bertrand
5b67d39aba feat: initial version of the project 2025-12-08 09:49:07 +01:00