upleb.uk

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

summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2024-12-12test(push): ff merge commit tag `merge-commit-id`DanConwayDev
allow any order of the commit ids
2024-12-12fix(push): three-way `merge-commit-id` `tag`DanConwayDev
should alway list only the three-way merge commit id.
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-11fix(NostrUrlDecoded): nip05 parsed as ssh userDanConwayDev
property `user`, which refers to the ssh user to be used when connecting to git remotes, was being parsed as the local section of the nip05 address
2024-12-11fix(NostrUrlDecoded): add nip05 loading to TUIDanConwayDev
so the user understands the cause of any delay if the domain takes a while to respond
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(nostr_url): improve nip05 git cache formatDanConwayDev
store all nip05s in a single git config item called "nostr.nip05" using the `<nip05>:<hex-public-key>` format with multiple values comma seperated. git config is suposed to be human readable so it consideration was given to storing the npub instead of hex but nip05 generally uses hex and its rarely, if at all, going to be read directly by humans. in the future it might be better to use git syntax for storing multiple items but library git2 doesn't support this. it would be trivial to do though. multiple nip05 items is an edge case so this format is ok for now.
2024-12-10test(NostrUrlDecoded): use `parse_and_resolve`Laszlo Megyer
update tests to use the async `parse_and_resolve` instead of removed `from_str` method
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-06feat(push): send fast-forward merge status eventDanConwayDev
when a proposal was merged using fast-forward status rather than by creating a three way merge commit. if there are multiple revisions, the first one that contains merged proposal tip will be referenced. if there are multiple proposals that contain one of the commits, they will all be marked as merged. the nip needs to be updated as there is no single `merge-commit-id` so that tag needs to support multiple values
2024-12-05test(ngit): no nostr remote, search for repoDanConwayDev
update the tests to reflect the changes in the previous 4 commits
2024-12-05fix(ngit): save new nostr url as git remoteDanConwayDev
when nostr address is unknown and user is prompted to enter it, ask the user to save it as a git remote.
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: limit `pr` branch names to 60 charsDanConwayDev
there needs to a limit so the total length of the ref name is < 252 keeping it shorter makes it easier for other contributors to work with
2024-12-02fix: repo_ref 'not found' err suggest `ngit init'DanConwayDev
if the nostr remote was created by the maintainer before `ngit init` was ran. the error is more likely to occur when a user clones a repo using the nostr remote whist the relay in the hint is down and the fallback relays dont have the announcement. or if the user is offline when they clone.
2024-12-02fix(repo_ref): clarify no repo event err msgDanConwayDev
as there might be a repo event but we couldn't find it
2024-12-02feat(init): improve guidance copyDanConwayDev
add a "maintainers.yaml" title to prevent a wall of unbroken text
2024-12-02fix(repo_ref): `try_from` capture `euc`DanConwayDev
if there is no marker or "euc". also capture name and description even if there are additional items in the tag array.
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-29refactor(repo_ref): use match instead of if letDanConwayDev
to improve legability of function
2024-11-29fix(push): maintainers.yaml check err handlingDanConwayDev
fix error introduced in 6bcac672e04cb316de1f952c08b07937c7db3cc6
2024-11-28fix(init): dont default git_server to nostr urlDanConwayDev
if nostr added as origin remote before repo announcement sent
2024-11-28feat(push): update repo ann with maintainers.yamlDanConwayDev
update the repo announcement event based on any updates to maintainers.yaml that are included in commits pushed to 'main' or 'master'
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-28refactor: remove fufilled commentDanConwayDev
as the feature is implmeneted
2024-11-27feat: only print awaiting signer with nip46DanConwayDev
using the backend feature I requested for rust-nostr
2024-11-27feat(login): contact remote signer when neededDanConwayDev
for existing login, the remote signer should only be called when an event needs to be signed. This might be a AUTH event so we still need to call it during read scenarios. a feature was added to rust-nostr to enable this.
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-27build: update readmeDanConwayDev
to simplify and target users more than contributors and prioritise building from source
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-27fix: add white border to qr codesDanConwayDev
to improve machine readability
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-26feat(login): add help contentDanConwayDev
add some basic copy under help
2024-11-26feat(login): add prompt to failed nsec loginDanConwayDev
as a minor UI improvement
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-25feat(list): report on action selectionDanConwayDev
there was a bug in `Interactor` so that reports were turned off by default for choices. This was embodied into the CLI tests but this turns them on in these scenarios.
2024-11-25fix: restore interactor report defaultDanConwayDev
which should always be true but was defaulting to false when the `dont_report` functions were added
2024-11-25test: fix cli interactor without promptDanConwayDev
reverts a change in f79014235e85554e3661b3f2a02b8fa88bc192ff which caused a subtle change to how choices were displayed that caused the cli tester error when choices without prompts were displayed eg. in `ngit list` tests
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): tweak local login wordingDanConwayDev
because a user might be logged in to the same account locally and globally
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-22feat(login): add create accountDanConwayDev
for the simpliest UX it creates and publishes a profile and relay list event.
2024-11-22feat(login): exit help with ctrl + cDanConwayDev
rather than any key press as `esc` wasn't included as a key press
2024-11-22feat(login): auto-proceed upon signer responseDanConwayDev
don't ask the user to press any key to proceed once the signer successfully responds. various approaches were to tried await either any key press or the signer reponse such as `tokio::oneshot`, `tokio::mpsc` and `tokio::watch` but all would keep the process running until key press. this solution of aborting with `signal::ctrl_c` prevents the work around of asking the user to press any key upon the signer reponse.
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-12fix: send event error messageDanConwayDev
rust-nostr v35/v36 changed the `pool.send_event_to` error message to use 'event/s not published' instead of the error message from the relay. `relay.send_event` supplies the useful error message.
2024-11-12test: prevent signer commentaryDanConwayDev
identification of signer has been removed from rust-nostr. until it is added back in we must always prompt the user about signing as if its a local signer the message will be removed before the user sees it. unfortunately this is picked up by the tests so we must only prompt the user when not running tests.
2024-11-12fix: get correct nip46 npub in edge caseDanConwayDev
when there is an npub listed in git config but login was via direct cli arguments to the current process, the wrong npub would be used. this is the case for the ngit_init tests. this can be more eligantly if rust-nostr NostrConnect::new() were updated to accept user public key as requested here: https://gitworkshop.dev/r/naddr1qvzqqqrhnypzq6xcz9jerqgqkldy8lpg7lglcyj4g3nwzy2cs6u70wejdaj7csnjqy88wumn8ghj7mn0wvhxcmmv9uqq5un4wd6z6mn0wd68y2z2qh0/issues/note1qa2pty0mnjhsme3thza24u3nv8u7859fqw2qg6fuyx9w00e2gekqvl3yg9
2024-11-11fix(login): only get signer npub when unknownDanConwayDev
on get the user public key from the remote signer when it is unknown so that read operations aren't blocked by being unable to reach remote signer
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-04feat(remote): show help when called directlyDanConwayDev
instead of printing an error when `git-remote-nostr` is called directly instead of via plugin, provide some guidance
2024-11-04refactor: remove ngit `pull` `push` `fetch`DanConwayDev
simplify api to encougage use of the git plugin
2024-10-31fix(init): remove broken blasterDanConwayDev
muntiny wallet has shut down and removed its blaster relay
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-10-28chore: bump rust-nostr to patch near v0.36.0DanConwayDev
bump all rust-nostr packages refactoring code based on breaking changes upgrading to patched version to address signer issue: nostr:nevent1qvzqqqqqqypzq6xcz9jerqgqkldy8lpg7lglcyj4g3nwzy2cs6u70wejdaj7csnjqy88wumn8ghj7mn0wvhxcmmv9uqzpsw5ph8le2n2kh6uchftawt74hddazk9tp7wjmz967y2l0uva5rc7hsstq
2024-10-28refactor: replace sqlite with lmdbDanConwayDev
as sqlite is depricated in rust-nostr
2024-10-02chore: apply patched rust-nostrDanConwayDev
which includes nip46 signer change so it can be initated without completing connection.
2024-09-25fix(remote): in list use `pr/`for authored prsDanConwayDev
currently the prefix is missed when listing refs after pushing a pr
2024-09-25chore: bump rust-nostr v0.35DanConwayDev
bump all rust-nostr packages
2024-09-25feat(remote): auth if logged inDanConwayDev
if login details are known, log in straight away and respond to auth requests. users can make a choice whether to sign these using their nip46 signer
2024-09-24fix(login): locally when globally logged inDanConwayDev
as it would fail to save to local git config
2024-09-24feat(login): login via nip46 QR codeDanConwayDev
or nostrconnect url string which is a much better UX flow for nip46
2024-09-23fix(remote): enable login through remote helperDanConwayDev
originally this was disabled because there was a concern that it would effect the operation of the remote helper due as it prints to stdout. it now only writes to stderr.
2024-09-23fix(remote): extend nip46 login timeout to 10mDanConwayDev
as 30s is too short for those of us fumbling with our remote signer app
2024-09-23fix(remote): add resilience to `prs`DanConwayDev
make poorly formatted patches fail silently. we stop trusting that the `commit` tag in the latest patch can be produced by apply the patches. to achieve this we must recreate the commit during the list command, which require fetching the parent oids. support patches without optional `commit` and `parent-commit` tags.
2024-09-20feat(remote): add send events status reportingDanConwayDev
to both tell users where events have been sent / failed to be sent and to provide a status update so the user doesn't think its crashed
2024-09-18test: fix gitlib2 version in sampleDanConwayDev
so they match v1.8.2 used in updated git2
2024-09-18fix(remote): create pr commit error reportingDanConwayDev
so it clear which patch is causing issues and it continues to report the fetch problem to the git client. we need a better solution it degrades gracefully rather than stopping the operation. perhaps list needs to only list PRs which it can create from existing data objects? perhaps list also needs fetch objects before fetch is called?
2024-09-18fix(remote): reporter lines on narrow terminalsDanConwayDev
remove the correct number of lines when reporter prints to narrow terminals
2024-09-18feat(remote): push report copyDanConwayDev
improved for push to each git server. report now reflects new branch / tag, delete branch / tag and force flag.
2024-09-17fix(remote): push don't report on writing 0 objDanConwayDev
in the TUI as its not useful
2024-09-17fix(remote): push reporting copyDanConwayDev
ensure commit id from and two are the correct way around