upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/src/bin/ngit
AgeCommit message (Collapse)Author
2025-05-31feat(init): only use one ngit-relay git server urlDanConwayDev
that of the current users pubkey. ngit will push to the git servers of other maintainers anyway.
2025-05-31feat(push): prevent push if no ann eventDanConwayDev
To ensure additional maintainers publish an annoucement event, require it for them to push
2025-05-24feat(init): make default ngit-relays configurableDanConwayDev
make the default set of ngit-relays configurable
2025-05-23feat(init): use dir name as default repo nameDanConwayDev
if you haven't cloned an existing nostr repo
2025-05-23feat(account): export npubDanConwayDev
allow exporting npub as well as nsec
2025-05-23fix(init): dont default to user read relay listDanConwayDev
as it usually full of inappropriate relays like purplepages.
2025-05-23fix(init): additional relays dont replace ngit-relaysDanConwayDev
instead of replacing ngit-relays with additoinal relays , suppliment
2025-05-23fix(init): improve cli outputDanConwayDev
for git push, a wait longer to allow ngit-relays to create repo
2025-05-23feat: only try http(s) for ngit-relaysDanConwayDev
otherwise it tries all the protocols and reprots on each
2025-05-23fix(init): ngit-relay usage detectionDanConwayDev
make sure blossom server is also present
2025-05-23fix: remove blossom url trailing slashDanConwayDev
when creating announcment with `ngit init`
2025-05-22refactor: cargo fmtDanConwayDev
should have done it at 4dc5d0c9fb170981cf4fade5558d7cc8da404aa3
2025-05-22feat(init): add blossomDanConwayDev
add a blossom tag to the repo announcement
2025-05-22feat(init): overhaul & simplify with ngit-relaysDanConwayDev
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.
2025-05-21fix: remove accidental printlnDanConwayDev
the details are included as default options
2025-05-21feat(init): dont ask about state unless neededDanConwayDev
reduce the scenarios where we confuse users about state
2025-05-21feat: add --customize flag for instructionsDanConwayDev
of how to customise ngit via git config items
2025-05-21feat: add support for default relay overridesDanConwayDev
via git config so they can be overwritten locally and globally
2025-05-05chore: nix flake updateDanConwayDev
update nix dependancies to latest version using default update options run `cargo clippy --fix` and `cargo fmt` to fix new clippy errors
2025-04-28fix(init): replace legacy gitworkshop urlDanConwayDev
with new format. but both default option and when previous web string used legacy format
2025-04-01chore: bump rust-nostr v0.37 ~> v0.40DanConwayDev
and fix all of the breaking changes
2024-12-20refactor: branch_name handlingDanConwayDev
improve clarity by renaming variables and methods defend against `branch-name` tag with an unsafe name
2024-12-20refactor: use nostr url from repo_refDanConwayDev
simplify to allow the removal of warning: `#[allow(clippy::too_many_arguments)]`
2024-12-16feat(init): default to nip05 git nostr urlLaszlo Megyer
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.
2024-12-16chore: bump nix flake rust nightly `fmt` overlayDanConwayDev
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`
2024-12-16chore: nix flake updateDanConwayDev
update nix dependancies to latest version using default update options fix warning related to idomatic patterns
2024-12-12fix: defend against empty`tags`DanConwayDev
prevent a panic when tags are of an unexpect length
2024-12-12feat(NostrUrlDecode): add nip05 address supportDanConwayDev
enable nostr git url format alongside and format Merge branch 'pr/nip05-lez(ff1845c0)'
2024-12-10fix(nostr_url): use nip05 in nostr url if cachedDanConwayDev
prioritise using nip05 nostr url format when the nip05, public key mapping is stored in the (usually local) git config.
2024-12-10feat(NostrUrlDecoded) add nip05 supportDanConwayDev
replace `NostrUrlDecoded::from_str` with `NostrUrlDecoded::parse_and_resolve` store nip05 pubkey mapping in git cache
2024-12-09fix: fetch user relays for `send`,`push` & `init`DanConwayDev
get the latest user relay list before pushing patches and repo announcement events
2024-12-05fix: `ngit`validate repo address existsDanConwayDev
when nostr address is unknown and user is prompted, validate that a the entered repo exists (there are events related to it) before proceeding
2024-12-04fix: `ngit` load correct repo addressDanConwayDev
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
2024-12-03refactor: limit fetch to 1 trusted coordinateDanConwayDev
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.
2024-12-02feat(init): improve guidance copyDanConwayDev
add a "maintainers.yaml" title to prevent a wall of unbroken text
2024-11-29feat(init): set remote `origin`DanConwayDev
check whether remote `origin` is nostr url and if not attempt to set it.
2024-11-29fix: spelling of 'beginning'DanConwayDev
as it was spelt with 1 'n'
2024-11-28fix(init): dont default git_server to nostr urlDanConwayDev
if nostr added as origin remote before repo announcement sent
2024-11-28feat(init): don't create maintainers.yamlDanConwayDev
because feedback is that its too confusing. mot removing it for existing projects that use it
2024-11-28feat(init): user read or fallback relaysDanConwayDev
as default instead of user write or none
2024-11-28fix(list): default to first PR menu itemDanConwayDev
because feedback was recieved that it doesnt appear like a menu
2024-11-28feat(init): reorder web inputDanConwayDev
so relays come straight after git server because they both require choices with some sort of mental burden
2024-11-27chore: bump rust-nosrt v0.37.0DanConwayDev
use RelayUrl in repo_ref which I had resisted as it mutates relay urls when printed to append a slash
2024-11-27fix:(init): show guidance when cli arg not usedDanConwayDev
instead of all the time. this also fixes the tests.
2024-11-27fix(init): dont repeatedly fetch signer pubkeyDanConwayDev
but instead use the value in user_ref
2024-11-27fix(init): improve git server explainationDanConwayDev
and move it below maintainers input
2024-11-27feat(init): make description optionalDanConwayDev
to make the onboarding experience smoother
2024-11-27build: add description to helpDanConwayDev
and add `ngit init` to description / help content
2024-11-27feat: hide cli credential args from helpDanConwayDev
as it makes the help harder to read and saving credentials is much better
2024-11-27feat(login): tweak api descriptionDanConwayDev
to add clarity and use PR instead of proposal
2024-11-27feat: remove `pull` `push` and `fetch` ngit cmdsDanConwayDev
to simplify the api and encourage use of the git remote helper
2024-11-27feat(login): tweak api descriptionDanConwayDev
to add clarity and not suggest cli args should be used
2024-11-27feat(account): move login/out cmds to accountDanConwayDev
move login, logout export-keys commands to sub commands under account
2024-11-27feat(logout): add logout commandDanConwayDev
rather than using `ngit login` which is less intuative
2024-11-27feat(export-keys): to use in other clientsDanConwayDev
as part of the easy on-boaridng flow
2024-11-26test(login): update `ngit login` testDanConwayDev
to reflect the new interface and testing only nsec login
2024-11-26fix(login): local option saves globallyDanConwayDev
when already logged, the option to login locally with different keys try to login globally
2024-11-26refactor: err msgs 'cannot' > 'failed to'DanConwayDev
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
2024-11-26feat(login): improve err msg locationDanConwayDev
adding a prompt makes it easier for the eye to pick up the issue.
2024-11-25fix(login): handle git config save errorsDanConwayDev
to guide the users how to login dispite the git config errors
2024-11-25feat(login): local login opt with `ngit login`DanConwayDev
instead of needing to include the local flag
2024-11-22feat(login): `ngit login` prompt to logoutDanConwayDev
if a local and or global account is already logged in, prompt to logout before overwriting with new login details
2024-11-22feat(login): `ngit login` use cli argsDanConwayDev
previously cli args were only used during other commands to bypass normal login
2024-11-22fix(login): `ngit login` from outside git repoDanConwayDev
it previously only worked from within or near a git repo directory
2024-11-21feat(login): overhaul login experienceDanConwayDev
* 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
2024-11-11chore: bump rust-nostr v0.36DanConwayDev
bump all rust-nostr packages to latest issued version. there have been some breaking changes to nip46 and this applies these changes.
2024-11-11Revert "refactor: remove ngit `pull` `push` `fetch`"DanConwayDev
This reverts commit 43b5e9b38bf5dcfbac85637a2d3efc69ddfe77ac.
2024-11-04refactor: remove ngit `pull` `push` `fetch`DanConwayDev
simplify api to encougage use of the git plugin
2024-10-31feat(init): support nostr state opt-outDanConwayDev
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.
2024-10-31feat(init): simplify maintainer selectionDanConwayDev
by first asking if the user is the only maintainer and if so not showing the npub selection option
2024-10-31feat(init): clarify name, id, desc labelsDanConwayDev
based on user testing and feedback
2024-10-31fix(init): dont err when nostr remote and no annDanConwayDev
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
2024-09-25chore: bump rust-nostr v0.35DanConwayDev
bump all rust-nostr packages
2024-09-13refactor: abstract find pr from branch nameDanConwayDev
so it is done consistantly across ngit and the remote helper
2024-09-13fix(ngit): improve find pr from branchDanConwayDev
so that it only finds branch name not prefixed with `pr/` if you are the author of the pr as there may be duplicate named prs.
2024-09-13fix(ngit): `pull` and `push` find pr from branchDanConwayDev
as since `cl.get_branch_name` has been introduced branch names could be prefixed with a pr and sometimes postfixed with an event id
2024-09-04refactor: fix imports, etc based on restructureDanConwayDev
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
2024-09-04refactor: organise into lib and bin structureDanConwayDev
the make the code more readable this commit just moves the files, the next commit should fix the imports