| Age | Commit message (Collapse) | Author |
|
Filter run_list state event candidates by the current remote's
maintainers to prevent cross-remote state contamination when
multiple nostr:// remotes share the same identifier.
|
|
when a repo has multiple nostr:// remotes sharing the same identifier,
relays can return state events authored by maintainers of the other
remote. without filtering, the newest event wins regardless of author,
pointing refs at the wrong commits.
state event candidates in run_list are now filtered to maintainers of
the current remote's repo announcement.
|
|
Fix GRASP server push path for PR proposals: URL normalisation
mismatch meant repo GRASP servers were never tried, causing every
PR submission to fall through to the fork-creation fallback.
|
|
is_grasp_server_in_list does a direct string comparison, but repo_grasps
(from grasp_servers()) contains normalised hostnames (e.g. relay.ngit.dev)
while repo_ref.git_server holds full clone URLs. They never match, so
to_try was always empty and every PR submission fell through to the fork
creation / personal GRASP server fallback path.
Fix: normalise each clone URL before comparing against repo_grasps.
|
|
Only advertise `refs/heads/pr/*` branches once their tip OIDs are
confirmed present locally; prevents `fatal: bad object` / `remote did
not send all necessary objects` errors during clone/fetch when a PR tip
lives on a different git server than the one that won the bulk prefetch
race.
After the bulk prefetch, collect remaining missing PR tip OIDs and do
one batch fetch per repo git server using only the OIDs that server has
advertised; break early once all are satisfied and skip servers that
carry none. Avoids batch-poisoning (a server rejects the whole request
if any single OID is absent) and redundant connections.
Restrict mop-up fetches and run_fetch to the repo's declared git
servers; do not fetch from clone-tag URLs in PR events - they are
submitter-supplied and could let a malicious or slow server stall every
clone/fetch operation.
Also apply rustfmt and fix clippy warnings.
|
|
Add git worktree support and fix patch parsing, panic on bare npub clone,
percent-encoding of reserved characters in identifiers, and push errors.
|
|
Repository identifiers can contain any characters per NIP-01 d-tag rules.
Encode them in nostr:// clone URLs (display and parse) and in GRASP
/<npub>/<identifier>.git paths, aligning with NIP-34 and GRASP-01.
|
|
- more robust patch parsing and gracefully handle errors
- panic when cloning a bare `nostr://npub/identifier` URL with no relay hints
|
|
Errors from get_merged_status_events no longer abort the push; the
call site now uses if let Ok(...) so failures are silently skipped.
Also replace an .unwrap() in create_merge_events with a safe
.map().unwrap_or_default() to avoid any panic in that path.
|
|
Add issue management, PR/issue comments and viewing, NIP-32 labels,
set-subject, cover notes, repo-only relays, and SKILL.md.
|
|
Add GitSystem to SignerInfoSource so credentials stored in the system
git config (/etc/gitconfig) are included in the priority fallback chain
(local > global > system) and shown as a separate level in whoami output.
|
|
Implements experimental kind-1624 cover note events:
- KIND_COVER_NOTE constant and process_cover_note() in git_events.rs;
replaceable semantics (latest created_at, hex-id tiebreak), author or
maintainer only
- kind-1624 events fetched alongside labels in the fetch pipeline;
cover_notes count added to FetchReport display
- ngit pr/issue view: cover note displayed in place of description with
a clear 'Cover Note:' header; maintainer-authored notes identify the
author; original description shown only with --comments; cover_note
object included in --json output
- ngit pr set-cover-note / ngit issue set-cover-note: publish a
kind-1624 event; nostr: mentions in --body converted to q/p tags via
tags_from_content (same rules as issue --body)
- Fix pre-existing clippy::too_many_lines on repo/mod.rs show_info
|
|
Adds the ability to update the displayed title of a PR or issue after
creation using a kind-1985 label event with the #subject namespace.
Only the author or a repository maintainer may set the subject. The
latest authorised event wins with tiebreak by lexicographically larger
event ID (NIP-1 replaceable event semantics). Branch names and commit
messages are never affected.
- Split get_labels() into process_labels() (additive #t) and
process_subject() (replaceable-style #subject), with a shared
get_labels_and_subject() entry point that processes both from a
single pre-fetched slice of kind-1985 events
- All list/view/JSON display paths apply the subject override silently
- New ngit pr set-subject <id> --subject <text> command
- New ngit issue set-subject <id> --subject <text> command
|
|
Add `ngit pr draft <id>` to convert a PR back to draft (kind-1632).
Add `ngit issue resolved <id> [--reason <text>]` to mark an issue as
fixed (kind-1631 GitStatusApplied), distinct from close which signals
wontfix/duplicate/invalid.
Add `--reason <text>` to `ngit issue close` — stored in event content.
Also fix success/error message wording in pr_status and issue_status to
use consistent past-tense action strings.
|
|
Publishes a NIP-32 kind-1985 label event referencing the target issue or
PR. Only the event author or a repository maintainer may apply labels.
Duplicate labels (already present via t-tags or prior kind-1985 events)
are silently skipped. The new event is saved to the local cache before
broadcasting so subsequent reads reflect the change immediately.
CLI:
ngit issue label <id> --label <L> [--label <L>...]
ngit pr label <id> --label <L> [--label <L>...]
|
|
- Add KIND_LABEL (kind 1985) constant to git_events.rs
- Add get_labels() merging inline t-tags with external kind-1985 events,
gating each on author-or-maintainer permission
- Extend get_fetch_filters() to request kind-1985 events for all known
issue and proposal IDs
- Track label event counts in FetchReport (field + Display + consolidation)
- Update issue_list.rs and list.rs to fetch label events from cache and
pass them through get_labels() instead of reading t-tags inline
|
|
Shows currently logged-in account(s) with name and npub. When both a
local (repo-scoped) and global account are configured, displays both
with local marked as active. Supports --json (returns local, global,
and active objects each with name, npub, nip05, scope) and --offline
(reads from cache only, no network). Fixes doc_markdown clippy warning
in cli.rs.
|
|
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.
|
|
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\`.
|
|
Mark v2.2.2 as yanked in changelog; include annotated-tag sync
regression fix in this release.
|
|
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.
|
|
Bump Cargo.toml version to 2.2.2 and promote CHANGELOG [Unreleased]
entries to [2.2.2].
|
|
kind-5 deletion events that only #e-tag a PR Kind event (kind 1618)
were never fetched because proposal_ids was built from Kind::GitPatch
events only. The deleted PR event remained in the local cache and
continued to appear as a remote ref (refs/heads/pr/<branch>).
|
|
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.
|
|
RepoState::try_from was explicitly discarding all refs/tags/*^{} entries
("peeled" refs) when parsing the nostr state event. This meant the list
command only advertised the tag object OID, but git requires two lines for
annotated tags:
<tag-object-oid> refs/tags/v1.0.0
<commit-oid> refs/tags/v1.0.0^{}
Without the ^{} peeled line git cannot resolve the tag to a commit, so
git fetch --prune treats it as unresolvable and deletes it.
The nostr state event already stores both entries correctly (written by
generate_updated_state in push.rs). The fix simply stops try_from from
discarding the ^{} entries on read, so they flow through to the list
output unchanged.
|
|
Replace nsec.app with bucket.coracle.social and nos.lol.
|
|
allows non-interactive bunker:// URL login without requiring --nsec,
by connecting to the remote signer and saving credentials to git config
|
|
display signer relays below QR code and nostrconnect URL with an option
to change them via the existing multiselect UI before connecting
|
|
Add a deletions counter to FetchReport, incremented in
process_fetched_events for each kind-5 event received and accumulated
across relays in consolidate_fetch_reports. The count is included in
the fetch summary display (e.g. "1 deletion", "2 deletions").
|
|
Add a non_proposal_event_ids parameter to get_fetch_filters and a
corresponding field on FetchRequest. On each fetch, the event IDs of
cached repo announcements and the state event are collected and used to
build a dedicated kind-5 filter keyed on #e tags, as specified by
NIP-09. The existing #a-tagged filter already covers addressable-event
deletions; this new filter catches deletions from clients that follow
NIP-09 strictly and do not embed a repo coordinate in their deletion
event.
|
|
When pushing a pr/ branch, the ahead slice is reversed by callers before
being passed to generate_patches_or_pr_event_or_pr_updates, making it
oldest-first. The tip/first_commit assignments were backwards (using
first()/last() as if the slice were youngest-first), so the merge-base
was computed as the parent of the PR tip rather than the parent of the
oldest commit. Multi-commit PRs therefore showed only 1 commit when
applied via ngit apply.
Adds an integration test that pushes a two-commit large-file PR branch
and asserts the merge-base tag equals the main branch tip.
|
|
update_remote_refs_pushed was calling peel_to_commit() for all refs,
discarding the tag object OID for annotated tags. This caused a mismatch
with generate_updated_state, which correctly stores the tag object OID in
the nostr state event. ngit sync would then push the commit OID to grasp
servers that expected the tag object OID, causing rejections.
|
|
git-remote-nostr now walks the per-relay state events captured in
FetchReport::state_per_relay (newest first) and advertises the first
one whose every OID is either present on at least one git server
(confirmed via list_refs) or already available locally. If no such
state event exists it falls back to the raw git server state.
Previously the latest nostr state event was always used regardless of
whether its OIDs had been pushed to any server, causing catastrophic
missing-object errors during clone or fetch when a state event was
published ahead of the corresponding git push.
|
|
refspec_remote_ref_name() only stripped refs/heads/, so tag refspecs
produced refs/remotes/origin/refs/tags/v1.0.0 instead of
refs/remotes/origin/v1.0.0. ngit sync reads the latter form, so the
tracking ref was never found and sync failed with 'src refspec does not
match any existing object'.
|
|
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.
|
|
When all git servers reject or skip a push, delete the newly-published
state event from the local nostr cache and restore the previous state
event (if any), so that a subsequent retry starts from a clean baseline
rather than a state that no server ever accepted.
|
|
When publishing the nostr state event before a git push, use the relay
results from send_events to skip any grasp server whose internal relay
did not receive the event. Print a clear warning for each skipped server
and emit error lines for all refs if no git servers remain to push to.
|
|
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.
|
|
Bump Cargo.toml version to 2.2.1 and promote CHANGELOG [Unreleased]
entries to [2.2.1].
|
|
Implement a custom WebSocketTransport that races IPv6 and IPv4 connections
with a 250ms head start for IPv6, matching browser behavior. This prevents
broken IPv6 from blocking all relay connections indefinitely.
This is a temporary fix until the upstream async-wsocket PR is merged:
https://github.com/shadowylab/async-wsocket/pull/42
|
|
now changes are in CHANGELOG.md
|
|
nos.lol always prompts for nip42 auth even for reading, making it
unsuitable as a default relay.
|
|
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.
|
|
pr/ branches now created via mbox fallback when optional tags are absent.
|
|
as a default relay as it is now offline
|
|
Add wss://relay.ditto.pub as a second default signer relay alongside
wss://relay.nsec.app for improved reliability during nostrconnect login.
|
|
Git push-options are line-based so literal newlines cannot be sent.
Users can now write the two-character sequence \n which is decoded
into real newlines before publishing. Use \\n for a literal backslash-n.
Includes unit tests, integration test, help text, and changelog entry.
|
|
Allows setting PR title and description via git push options:
git push --push-option=title="My PR" \
--push-option=description="Details" origin pr/branch
|
|
to reflect changes since v2.1.0
|
|
now changes are in CHANGELOG.md
|
|
now changes are in CHANGELOG.md
|
|
to CHANGELOG.md just for reference and completeness
|
|
and maintain this going fowards
|