upleb.uk

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

summaryrefslogtreecommitdiff
path: root/src/bin/git_remote_nostr
AgeCommit message (Collapse)Author
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-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-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-11-29fix: spelling of 'beginning'DanConwayDev
as it was spelt with 1 'n'
2024-11-29fix(push): maintainers.yaml check err handlingDanConwayDev
fix error introduced in 6bcac672e04cb316de1f952c08b07937c7db3cc6
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-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-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-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-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-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-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-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-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): 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-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
2024-09-17fix(remote): `push` exit protocol loop on successDanConwayDev
so that other protocols are not tried after push was successful
2024-09-17feat(remote): store successful protocol in configDanConwayDev
if another protocol was tried first and failed
2024-09-17refactor(remote): `push` report to match `fetch`DanConwayDev
use the same approach taken with reporting remote status in `push` as is used in `fetch`
2024-09-17fix(remote): `fetch` dont show resolving 0 deltasDanConwayDev
in progress updates as its not resolving any deltas
2024-09-16fix(remote): fetch report join remote linesDanConwayDev
when they are sent via multiple messages
2024-09-16refactor(remote): add tests to fetch reportingDanConwayDev
and slightly refactor
2024-09-13fix(remote): add robustness to push reportingDanConwayDev
by avoiding bugs where lines are removed accidentally by storing report in a mutex and rewriting the entire report at each update
2024-09-13fix(remote): clear `fetching ref list`DanConwayDev
so it doesn't remain in the TUI
2024-09-13fix(remote): fetch status reduce line writesDanConwayDev
by only removing and rewriting transfer progress
2024-09-13fix(remote): add rebustness to fetch reportingDanConwayDev
by avoiding bugs where lines are removed accidentally by storing report in a mutex and rewriting the entire report at each update
2024-09-13refactor: abstract find pr from branch nameDanConwayDev
so it is done consistantly across ngit and the remote helper
2024-09-12fix(remote): `push` status updatesDanConwayDev
push needs to use push_transfer_progress rather than transfer_progress
2024-09-12fix(remote): generalise auth failure detectionDanConwayDev
by using words or short phrases
2024-09-12fix(remote): `push` detect ssh auth failureDanConwayDev
adding new errors that are authentication related
2024-09-12fix(remote): improve `push` status updatesDanConwayDev
to bring them more into line to the native git client
2024-09-12fix(remote): improve fetch & list status updatesDanConwayDev
to bring them more into line to the native git client
2024-09-12feat(remote): add fetch status updatesDanConwayDev
based off of: https://github.com/rust-lang/git2-rs/blob/master/examples/fetch.rs
2024-09-12fix(remote): stop fetching after successDanConwayDev
instead of trying again over fallback protocols
2024-09-12fix(remote): identify auth failureDanConwayDev
so that attempts can be made to use a fallback protocol
2024-09-12fix(remote): update copyDanConwayDev
to make it more like native git
2024-09-09feat(remote): push protocol selection / fallbackDanConwayDev
enable override from nostr url clone url is filesystem use filesystem otherwise try ssh, then https authenticated unless clone url is http, then try ssh then http as we assume, we are on a local trusted network.
2024-09-06fix(remote): `fetch` and `list` status copyDanConwayDev
so that it the filesystem url is shown
2024-09-06feat(remote): just use ssh if auth succeedsDanConwayDev
and don't proceed to https or http
2024-09-06fix(remote): `list` apply protocols selectionDanConwayDev
used in fetch and tweak the error reporting
2024-09-06fix(remote): improve protocol selction / fallbackDanConwayDev
abstract the protocols and order to try under different scenarios add some additional scenarios eg hardcoded http tweak error reporting
2024-09-06feat(remote): fetch protocol selection / fallbackDanConwayDev
enable override from nostr url clone url is local use local otherwise try https unathenticated, ssh, then https authenticated
2024-09-04refactor(remote): split into modulesDanConwayDev
to make it easier to read
2024-09-04refactor: use FromStr trait for NostrUrlDecodedDanConwayDev
as it should have been used in the first place
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