| 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`.
|
|
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\`.
|
|
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 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.
|
|
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.
|
|
Ensures the relay hint is always a grasp server when configured.
|
|
Reorganize imports and fix formatting issues flagged by clippy and rustfmt.
|
|
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.
|
|
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 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.
|
|
as it was only checking if tip is a commit thats present but a tip
could be an annotated tag
|
|
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.
|
|
to keep the user informed of whats happening / happend
|
|
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.
|
|
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
|
|
in function, params and variable names
|
|
includes a change to a git config itme name
|
|
that of the current users pubkey. ngit will push to the git servers of
other maintainers anyway.
|
|
To ensure additional maintainers publish an annoucement event,
require it for them to push
|
|
make the default set of ngit-relays configurable
|
|
if you haven't cloned an existing nostr repo
|
|
as it usually full of inappropriate relays like purplepages.
|
|
instead of replacing ngit-relays with additoinal relays , suppliment
|
|
for git push, a wait longer to allow ngit-relays to create repo
|
|
otherwise it tries all the protocols and reprots on each
|
|
make sure blossom server is also present
|
|
when creating announcment with `ngit init`
|
|
should have done it at 4dc5d0c9fb170981cf4fade5558d7cc8da404aa3
|
|
add a blossom tag to the repo announcement
|
|
introduce ngit-relays as a way of setting git servers and relays at
the same time using a standard for specific repo locations:
https://<domain-port-path>/<npub>/<identifer>.git
add simple and advanced modes.
prompt less. eg always set remote origin to nostr url.
automatically push main or master branch.
|
|
the details are included as default options
|
|
reduce the scenarios where we confuse users about state
|
|
via git config so they can be overwritten locally and globally
|
|
update nix dependancies to latest version using default update options
run `cargo clippy --fix` and `cargo fmt` to fix new clippy errors
|
|
with new format. but both default option and when previous web
string used legacy format
|
|
and fix all of the breaking changes
|
|
simplify to allow the removal of warning:
`#[allow(clippy::too_many_arguments)]`
|
|
If the user has NIP-05 set up in profile, and it resolves at the time
of running `ngit init`, NIP-05 will be used in the nostr remote url.
|
|
update the rust nightly `fmt` overlay which needs to be pinned
to a specific version (this case by date)
update formatting in main files via `cargo fmt`
|
|
update nix dependancies to latest version using default update options
fix warning related to idomatic patterns
|
|
enable nostr git url format
alongside and
format
Merge branch 'pr/nip05-lez(ff1845c0)'
|
|
prioritise using nip05 nostr url format when the nip05, public key
mapping is stored in the (usually local) git config.
|
|
replace `NostrUrlDecoded::from_str` with
`NostrUrlDecoded::parse_and_resolve`
store nip05 pubkey mapping in git cache
|
|
get the latest user relay list before pushing patches and repo
announcement events
|
|
git-remote-nostr is always called with a nostr remote that specifies
a single repository coordinate whereas `ngit` commands need to
discover this.
this change moves from getting this value from the following places
in priority order:
1. git config item `nostr.repo`
2. first nostr remote discovered
2. maintainers.yaml
3. prompt the user
to:
1. nostr remote - if multiple, prompt the user to select
2. git config item `nostr.repo`
3. maintainers.yaml - removing the legacy format
4. prompt the user - now with support for nostr remote format
|
|
previously fetch supported fetching multiple trusted coordinates at
once. The additional complexity trade off isn't worth it.
It will still fetch events related to the coordinates of maintainers
that the trusted maintainer lists.
A scenario where there might be multiple trusted coordinates is
where a large repo is split into multiple nostr repos to manage
pull requests and issues in seperate sub-units. I might therefore
have different remotes that target different identifiers.
There also might be different set of maintainers groups that are
have different views on the latest state of the same codebase and
they haven't split off into using different identifiers.
Its simplier ngit to fetch these different nostr repos independantly
when requested. git-remote-nostr will do this automatically as it
works through remotes but for ngit cmds a further change is required
so `get_repo_coordinates` and `try_and_get_repo_coordinates` prompts
to select the desired one.
|
|
add a "maintainers.yaml" title to prevent a wall of unbroken text
|
|
check whether remote `origin` is nostr url and if not attempt
to set it.
|
|
if nostr added as origin remote before repo announcement sent
|
|
because feedback is that its too confusing. mot removing it for
existing projects that use it
|
|
as default instead of user write or none
|
|
so relays come straight after git server because they both require choices
with some sort of mental burden
|
|
use RelayUrl in repo_ref which I had resisted as it mutates relay
urls when printed to append a slash
|
|
instead of all the time. this also fixes the tests.
|
|
but instead use the value in user_ref
|
|
and move it below maintainers input
|
|
to make the onboarding experience smoother
|
|
in nearly all cases 'cannot' was used when an action was tried and
failed. 'failed to' is strictly better because:
* just because the action didn't work that time doesnt mean it
cannot work
* it is better at drawing the users attention to a problem
|
|
* simplify login menu, making it more accessable to newcomers and
easier to select remote signer options
* enable `ngit login` to work from anywhere (not just a git repo)
* assume fresh login details saved to global git config but fallback
to local repository
* maintain local repository login via `ngit login --local`
* maintain login via CLI arguments eg `ngit send --nsec nsec123`
* nudge users to remember nsec when pasting in ncryptsec for a
better UX, whilst maintaining the option to be prompted for
password everytime
* create placeholder menu items for help menu and create account
|
|
bump all rust-nostr packages to latest issued version.
there have been some breaking changes to nip46 and this applies
these changes.
|
|
when multiple maintainers enable opting out of storing state on nostr
this prevents other maintainers from pushing a state to the
git server which nostr servers wouldnt see because they are using the
nostr state.
|
|
by first asking if the user is the only maintainer and if so not
showing the npub selection option
|
|
based on user testing and feedback
|
|
when the user has set a remote to a nostr url but hasn't initiated
the repository on nostr - dont error but instead use the identifier
in the remote
|
|
move some functions out of ngit and into lib/mod
and lib/git_events
remove MockConnect from binaries so it is only used in the library.
this was done:
* mainly because automocks were not being imported from
lib into each binary
* but also because the these functions were being
tested with MockConnect
|
|
the make the code more readable
this commit just moves the files, the next commit should fix the imports
|