| Age | Commit message (Collapse) | Author |
|
Outputs {"is_nostr_repo": false} when not in a nostr repository, or
full structured JSON (name, identifier, description, nostr_url,
coordinate, maintainers, grasp_servers, git_servers, relays, hashtags)
when it is. Always exits 0. Also adds --title as an alias for --name
on `ngit init`.
|
|
- parse nostr: URI mentions in issue bodies, comment bodies, PR
descriptions, patch commit messages and cover letters
- npub/nprofile mentions produce p tags; note/nevent/naddr mentions
produce q tags per NIP-22
- naddr q tag value uses raw <kind>:<pubkey-hex>:<identifier> format
- nevent pubkey field populated from embedded author or local cache lookup
- dedup_tags() removes duplicate p tags and suppresses q tags whose
event-id is already covered by an existing e threading tag
- all parsing errors are non-fatal: invalid nostr: tokens are skipped
|
|
- rename --hashtag (comma-separated) to --label (repeatable) on issue list,
matching the --label flag already used on issue create
- add --label filter to pr list with the same OR semantics (matching GitHub)
- display labels column in pr list table and Labels: line in pr view
- include labels array in all JSON outputs (list and view for both issue and pr)
- rename internal 'hashtags' -> 'labels' throughout issue_list.rs and list.rs
|
|
- issue view and pr view now show only a comment count by default
- pass --comments to include the full thread
- JSON output always includes comment_count; comments array only with --comments
- each comment in the thread includes reply_to (null for top-level, parent
comment id for replies)
- human-readable view shows a dim '↳ reply to <short-id>' line on replies
|
|
- Add missing P and p tags (root and parent author pubkeys)
- Fix E tag 4th element to be root pubkey (was empty string)
- Fix e tag 4th element to be parent pubkey (was "reply", a NIP-10 convention)
- Add --reply-to <ID|nevent> flag to both issue and PR comment commands
- When --reply-to is set, look up the parent comment from cache and use it
as the parent scope (e/k/p); root scope (E/K/P) always stays the issue/PR
- When --reply-to is omitted, parent == root (existing top-level behaviour)
|
|
ngit pr view <id> and ngit issue view <id> now fetch and display all
NIP-22 comments in chronological order with author npub and timestamp,
rather than just a count. JSON output includes the full comment array.
Also updates list table hint text to reference ngit pr subcommands.
|
|
Introduce ngit pr subcommand group (list, view, checkout, apply, send,
close, reopen, ready, comment, merge) replacing the former top-level
ngit list/checkout/apply commands. ngit send is kept at the top level.
Expand ngit issue with view, create, close, reopen, comment subcommands.
Status changes (close/reopen/ready) are gated to the PR/issue author or
a repository maintainer. ngit pr merge is maintainer-only and publishes
a GitStatusApplied event immediately after the git merge.
|
|
Download kind-1111 NIP-22 comments from relays and show a comment count
in the detail view of `ngit list <id>` and `ngit issue list <id>`.
- git_events: add KIND_COMMENT constant (kind 1111)
- client: import KIND_COMMENT; add `comments` field to FetchReport;
route kind-1111 events into report.comments in process_fetched_events;
consolidate comments across relay reports; display "N comment(s)" in
FetchReport; add a #E-tagged kind-1111 filter in get_fetch_filters
covering all known issue and proposal root IDs
- issue_list: add get_comment_counts() to query the local cache for
kind-1111 events by #E tag and count per issue; extend the filtered
tuple with comment_count; show a CMTS column in the table, a
"Comments: N" line in the detail view, and a "comments" field in JSON
- list: add KIND_COMMENT import; add resolve_event_id() helper and
get_comment_count_for_proposal() to look up the count for a single
proposal from the local cache; pass comment_count into
show_proposal_details(); display "Comments: N" in plain text and
"comments" in JSON; align detail-view labels
|
|
Non-interactive listing of NIP-34 issues (kind 1621) with status
resolution, hashtag display, and detail view.
- get_issues_from_cache: fetch GitIssue events from local cache by repo
coordinate, mirroring get_proposals_and_revisions_from_cache
- ngit issue list: table output of ID, status, title and hashtags at end
of each row; status resolved via existing get_status() logic
- --status: comma-separated filter (open,draft,closed,applied; default: open)
- --hashtag: comma-separated label filter (case-insensitive, OR match)
- --json: machine-readable output including hashtags and description
- --offline: skip network fetch, use local cache only
- <id>: optional positional argument (hex event-id or nevent) to show
full details of a specific issue including body content
|
|
Adds a git config key nostr.repo-relay-only that, when set to true, causes
nostr events to be sent only to the repository's own relays, skipping the
user's personal write relays and default/blaster relays. Useful for
repositories that should not broadcast to the maintainer's personal relay set.
Set persistently via \`git config nostr.repo-relay-only true\` or in one step
with \`ngit init --repo-relay-only\`.
|
|
Regression introduced in 28ad5440: ngit sync crashed with
'invalid refspec refs/remotes/origin/v1.4.4^{}:refs/tags/v1.4.4^{}'
on repos with annotated tags. Fixed by guarding all three iteration
sites in sync.rs and identify_remote_sync_issues in list.rs; also
corrected the always-false logic bug in invalid_nostr_state_ref.
|
|
allows users to repair repos whose state event is missing ^{} peeled refs
for annotated tags (or any other corruption) without needing to push a new
ref. the new event is signed with a fresh timestamp and broadcast to all
repo relays and the user's write relays.
|
|
allows non-interactive bunker:// URL login without requiring --nsec,
by connecting to the remote signer and saving credentials to git config
|
|
FetchReport now captures the full state event seen on each relay during
the nostr fetch (state_per_relay: HashMap<RelayUrl, Option<Event>>).
ngit sync uses this to identify grasp server relays with a missing or
outdated state event and publishes the current state event to them
before attempting git pushes, preventing rejections. An existing login
is loaded silently (no prompt, no profile fetch) to provide a signer
for NIP-42 auth if requested.
|
|
Change send_events() return type from Result<()> to
Result<Vec<(String, bool)>> so callers can inspect which relays
accepted events. Update the finish message to show
"Published to X/N relays (failed: ...)" instead of the unconditional
"Published ... to nostr relays".
|
|
When syncing, the nostr state stores refs with full names like
refs/heads/master and refs/tags/v1.0.0. Git tracking refs strip the
refs/heads/ prefix, so the tracking ref lives at refs/remotes/origin/master
not refs/remotes/origin/refs/heads/master.
The sync code was interpolating the full nostr_ref_name into the source
side of the refspec, producing the invalid double-prefixed path. Strip
refs/heads/ or refs/tags/ before constructing the tracking ref segment,
consistent with how git_remote_nostr/push.rs already handles this.
|
|
Any -o option passed to `git push` that is not handled by ngit
(title, description) is forwarded verbatim to the git server via
git2::PushOptions::remote_push_options. This allows options such as
`-o secret-scanning.skip` to pass through transparently.
`ngit send` gains a matching -o / --push-option flag for the same
purpose.
|
|
- print hint line immediately, before coordinate lookup and relay fetch
- users see available subcommands (init, edit, accept) without waiting
|
|
- make repo name bold yellow as a title; section headings bold dim
- add dim horizontal rules above and below the name/description block
- move earliest unique commit to the bottom (after additional relays)
- add --offline flag to skip network fetch and use local cache only
|
|
- suppress fetch summary (no updates / updates: X)
- write blank line to stderr after relay errors for clear separation
- show identifier below title only when it differs from name
- show earliest unique commit (root_commit) in metadata
- restructure infrastructure into grasp servers / additional git
servers / additional relays sections
- display grasp servers by domain only (strip scheme, npub, repo path)
- strip wss:// prefix from relay display
- show maintainer names from metadata cache; fall back to short npub
- append (you) next to the current user's name wherever it appears
- show [name] attribution and the maintainer model note only when
there is more than one maintainer
|
|
- `ngit repo` (no subcommand): show repository info including maintainer
tree, per-maintainer infrastructure attribution, and a note explaining
the union-vs-personal field model and recursive maintainer sets
- `ngit repo init`: alias for `ngit init`
- `ngit repo edit`: same as init but signals intent to update an existing
repository announcement
- `ngit repo accept`: scoped command for co-maintainers to publish their
announcement; errors with clear messages for all other states (trusted
maintainer, already accepted, not invited, no repo found)
|
|
when a co-maintainer has no grasp servers of their own, fall back to
the trusted maintainer's grasp servers rather than jumping straight to
system defaults. if the trusted maintainer only uses a single grasp
server, the first system default is appended for redundancy. system
defaults are only used when neither the user nor the trusted maintainer
has any grasp servers configured.
|
|
Public relays are no longer recommended; grasp servers cover relay
needs. The interactive prompt now reflects this.
|
|
ngit init and accept_maintainership_with_defaults no longer seed relay
lists from the client default set. The relay list in a Kind:30617
announcement now contains only grasp-server-derived relay URLs; no
additional public relays are suggested or added automatically.
|
|
move apply_grasp_infrastructure, latest_event_repo_ref to lib/repo_ref.rs
and wait_for_grasp_servers + grasp_servers_from_user_or_fallback to a
new lib/accept_maintainership.rs so both binaries can share them.
add accept_maintainership_with_defaults which publishes the co-maintainer's
own Kind:30617 announcement with defaults (user grasp servers, shared
metadata from existing events) then waits for grasp server provisioning
and updates nostr.repo config and origin remote.
replace the push error block with a call to accept_maintainership_with_defaults
so pushing now silently accepts co-maintainership instead of failing.
|
|
when a co-maintainer runs ngit init, it now clearly states upfront
that they are accepting a co-maintainership offer (not creating a
new repo), shows who offered it, and on completion confirms the
acceptance and explains they can now push. updating an existing
co-maintainer announcement also gets its own clear message.
|
|
Remove the patch_supports_commit_ids gates in checkout.rs and list.rs
that pre-dated the mbox fallback logic. apply_patch_chain already
handles all fallback cases. Also replace the main-branch TODO fallback
in make_commits_for_proposal with get_parent_commit_from_patch, which
uses timestamp-based best-guess when the parent-commit tag is absent.
|
|
- Add mbox_parser module to extract metadata from patch content
- Extract author/committer from From: and Date: headers when tags missing
- Extract commit message body as fallback for description tag
- Implement best-guess parent commit logic using committer timestamps
- Update patch_supports_commit_ids to accept mbox-parseable patches
- Enable patches without optional tags to appear as pr/ branches
|
|
Instead of erroring when a proposal uses PR format (kind 1618/1619),
ngit apply now fetches the tip commit from git servers, determines the
base commit via the merge-base tag or by walking ahead of main, generates
patch text for each commit using git2, and applies via git am.
Also fixes a bug where clone-tag server hints were silently skipped in
the fetch fallback, and refactors the git-am invocation into a shared
helper to avoid duplication between the patch and PR code paths.
|
|
apply_grasp_infrastructure was inserting each grasp relay at index 0,
causing later servers to displace earlier ones. the last server in the
list ended up as relays[0] and thus the url relay hint, reversing the
intended priority order.
|
|
instead of generic 'Publishing to nostr relays...' messages, describe
what is being published e.g. 'Publishing 3 patches to nostr relays...'
or 'Publishing 1 announcement and 1 state event to nostr relays...'
|
|
Replace arbitrary 5-second countdown with active polling of grasp
servers during ngit init. Servers are checked every 1s with a 7s
timeout (2s in tests). Shows progress like '1/2 grasp servers ready'.
Grasp servers return 404 until the repo is provisioned, so we poll
until they accept git connections. Proceeds anyway on timeout rather
than failing, since some servers may still be initializing.
|
|
Allow users to specify custom signer relays for nostrconnect login.
Relay URLs are auto-prefixed with wss:// if no scheme is provided.
|
|
Ensures the relay hint is always a grasp server when configured.
|
|
Skip network fetch when --offline is set, using only local cache
|
|
Use console::style().yellow() for 'To view/checkout/apply' hints
to match git CLI hint styling.
|
|
Users may not be aware that ngit list defaults to filtering by
open,draft status. Display the active filter at the top of the
output to make this clear.
|
|
Shows 'To view: ngit list <id>' when listing proposals without an id,
helping users discover they can view individual proposals in detail.
|
|
this prevents cli output errors on tests such as:
finds_based_on_naddr_on_embeded_relay_and_added_as_origin_remote
|
|
Shows a progress spinner when fetching from git remotes in non-verbose mode.
Suppresses git fetch output and listing messages when not in verbose mode.
Uses NGITTEST environment variable for test timeouts.
|
|
Truncated IDs cannot be used with --id flag for checkout or apply commands.
|
|
Reorganize imports and fix formatting issues flagged by clippy and rustfmt.
|
|
When a PR branch already exists locally, the previous code would silently
move the branch pointer without checking for tracking or fast-forward safety.
Now:
- If branch has tracking: checkout and warn user to git pull
- If no tracking and fast-forward: safely move pointer
- If no tracking and diverged: show copy-paste commands for reset/rebase
- If commit not found locally: suggest fetching
Uses console crate for yellow output instead of hardcoded ANSI codes.
|
|
When a nostr:// remote exists, run git fetch instead of internal fetch
to populate remote tracking refs. Then checkout the remote branch with
proper upstream tracking so git pull works correctly.
|
|
- Add --status flag for filtering (default: open,draft)
- Add --json flag for JSON output
- Add optional <id> argument for showing proposal details
- Rename interactive logic to launch_interactive()
- Non-interactive mode outputs table format by default
- Use -i flag for interactive mode
Phase 3 of non-interactive ngit list implementation.
|
|
Adds a new 'ngit apply <event-id>' command that applies proposal patches
to the current branch. Supports --stdout flag to output patches for
piping to git am.
Phase 2 of non-interactive ngit list implementation.
|
|
Adds a new 'ngit checkout <event-id|nevent>' command that creates or
updates a proposal branch and checks it out. Supports both PRs and
patches with parent-commit references.
Phase 1 of non-interactive ngit list implementation.
|
|
When user is the maintainer and runs ngit init without args, validate
against cached repo_ref before making network requests. This avoids
unnecessary relay timeouts when the error would be 'no arguments
specified, use --force'.
|
|
multi-input flag that inherits from the latest pushed announcement
event, defaulting to empty when no existing hashtags are found
|
|
alas an idea before its time has yet come.
|
|
Allow multiple values via repeated --relay flags
instead of the less intuitive plural --relays form.
|
|
Allow multiple values via repeated --grasp-server flags
instead of the less intuitive plural --grasp-servers form.
|
|
- Add --relay flag to 'ngit account create' allowing users to specify
relay URLs (repeatable). Defaults to relay-default-set when not provided.
- Remove fallback relays from fetch when repo context exists (repo
coordinate provided). Only use them for bootstrapping (profile discovery
with no repo context).
- Remove fallback relays from publish when repo or user relays exist.
Only use them when neither is available (e.g. new account signup).
- Update --customize help text to reflect new relay-default-set behavior.
|
|
Rewrite ngit send to support non-interactive mode:
- Add validation for required arguments (title/description)
- Add --force flag to bypass commit suitability checks
- Add --no-cover-letter flag to skip cover letter
- Improve error messages for missing required fields
- Update title/description/cover-letter logic for non-interactive mode
- Add comprehensive tests for non-interactive behavior
|
|
Complete rewrite of ngit init to support non-interactive mode by default.
Key changes:
- Implement hybrid validation (validate all args upfront, fail fast)
- Add --grasp-servers flag for specifying git servers
- Prefer --name over --identifier for better UX
- Add comprehensive validation with helpful error messages
- Support both clone and init-from-existing-repo workflows
- Add --force flag to bypass safety checks
- Update tests for new non-interactive behavior
- Add test utilities for non-interactive testing
|
|
Update login flow to support non-interactive mode with --nsec flag.
Refactor login logic to handle both interactive and non-interactive cases.
Add better error handling and validation.
|
|
Add new 'ngit account create' subcommand to create nostr accounts.
This replaces the previous 'signup' command and supports both interactive
and non-interactive modes.
|
|
copy relay fetching approach to async and reporting
|
|
so it doesnt use the git_repo
|
|
also reduce the clutter in the cli output for grasp servers.
|
|
also fix the report so that we show nip10 style statuses too
|
|
to ensure we dont try and fallback to ssh
|
|
update patches ahead of wider upgrade. clippy required some autofixes
|
|
replaces the "user" in the nostr_url format with
"ssh_key_file", to support the original intent, which was to allow
users to specify different authentication credentials.
most git servers always expect the ssh user to be 'git'.
the idiumatic way of specifying logging in as a different user is to
specify a different ssh key.
the idiomatic way of storing non-default ssh keys is in the location
`~/.ssh/key_name`. "ssh_key_file" can be specified as `key_name`,
for keys in the default location, or as a relative or absolute custom
location eg. `/other_keys/.ssh/nym1` or `../.ssh/nym1`.
BREAKING CHANGE: in nostr git url nym1@ssh/npub123/identifer, nym1 is
now treated as ssh key file location rather than a ssh user. it can
be specified as a file within `~/.ssh` eg `~/.ssh/nym1` or a full or
relative path.
|
|
following its inclusion in the NIP-34 spec
|
|
so users can choose when there commits are too big or small instead
of relying on the 60kb rule
|
|
as it was only checking if tip is a commit thats present but a tip
could be an annotated tag
|
|
and fail more gracefully if refs cant be fetched, by continuing
to sync other refs
|
|
and include prompt about pushing understanding pushing directly to
git servers
|
|
list and allow selection / deselection of non-grasp servers when
at least one grasp servers is selected and a non grasp server is a
suggested default.
|
|
now we check and fetch them
|
|
when an existing origin exists and local branch is up-to-date
`git push` wont successfully publish state event and push refs to
other git servers listed.
we now publish the state event during this init function and use
sync to push all refs in state are to all git servers.
|
|
move the PR push code in 'ngit send' into lib.
reuse the non-interactive fallbacks in git-remote-nostr
|
|
abstracted git remote helper fetch functions
added support to `ngit list` to fetch PR data and checkout as proposal
branch
|
|
we weren't correctly identifying valid nostr state refs
|
|
limit syncing to a single reference with this new parameter.
change instructions for out of sync remotes to use sync with this new
option.
|
|
having implemented 3b5c48f5a2a4b9be5d14baa8f5e801fefd5c1166,
a ref pushed to refs/nostr/<event-id> on a github repo was accepted
but was not confirmed
|
|
to keep the user informed of whats happening / happend
|
|
attempt to use a range of protocols instead of unath http
|
|
to make it's purpose clearer
|
|
so its clear from the TUI what has just been sent
|
|
instead of relying on hardcoded grasp server options.
couldn't we look up those selected for other repos for the user
instead?
|
|
if use is maintainer, push PR to all repo git servers.
if user has a fork, push to all git servers it lists, and repo
grasp servers.
if user hasn't got a fork but has a user grasp list and pushing
push to repo grasp servers fails, create a personal-fork
automatically at each user grasp server and push there.
fallback to prompting user for either grasp servers or git server
with write permission.
if user provides grasp servers, suggesting adding to user preference
list.
|
|
allow specifying ref for pushing PR to custom clone url
|
|
if the repo doesnt list any grasp servers, or pushing to them fails
|
|
send as a PR if the commit would make patches that are too big for
nostr events.
send as a PR update if the proposal is PR.
send as a PR, revising a patch root, if patches would be too big.
in tests `get_pretend_proposal_root_event` has to be a actual proposal
with a tip, rather than just a cover letter, so we have replaced it.
|
|
where just the nevent will do
|
|
as the function is too long
|
|
required for rust-nostr v0.43 update
|
|
with nostr state. optionally use 'force' flag
|
|
and show a more helpful message when proposal can be checked out
using the remote
|
|
adjust the help text to reflect availablity of PR event for when a
patch is selected that doesnt list a parent commit id
|
|
using the recently abstracted `get_status` function
|
|
for use by `ngit list`
|
|
Rename `params.fallback_relays` and `client.fallback_relays` to
`relay_default_set`. Rename `params.fallback_grasp_servers` to
`grasp_default_set`. This includes updating associated getters and
usages across the codebase.
|
|
so that they can be used as part of push and send
|
|
a grasp server doesnt need to appear in repo announcement event
`blossoms` tag as blossom has been removed from the grasp spec
|
|
we try and get them from clone urls of repo and fallback to
those specified by contributor
|
|
remote will list the refs under `pr/*` namespace.
`ngit list` will display in the list of open / draft proposals.
it won't yet fetch the related oids to enable fetching or checking
out the branch.
|
|
to latest available and apply fmt fixes
|