upleb.uk

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

summaryrefslogtreecommitdiff
path: root/src/bin/git_remote_nostr/push.rs
AgeCommit message (Collapse)Author
2026-02-20improve push error when co-maintainer has no announcementDanConwayDev
the previous message said 'run ngit init' with no explanation of why or what it does. the new message explains the user has been offered co-maintainership, names the repo, and points to 'ngit init -d' for a fast non-interactive acceptance path.
2026-02-17fix: apply push-options to patch series generationDanConwayDev
The title and description push-options were previously only applied to PR creation but not to patch series generation. When force-pushing to update an existing patch series, the custom title and description were ignored. This change passes the title_description parameter to the patch generation function, allowing users to customize patch series cover letters via: git push --force --push-option=title="Title" \ --push-option=description="Description" origin branch Includes integration test for force-pushing patches with custom cover letter.
2026-02-17feat: add push-options for title and description to git-remote-nostrDanConwayDev
Allows setting PR title and description via git push options: git push --push-option=title="My PR" \ --push-option=description="Details" origin pr/branch
2026-02-16fix: report wording consistancy in publishingDanConwayDev
always report publishing and finish with published
2026-02-10fix: make git-remote-nostr push non-interactiveDanConwayDev
Update push operations to use non-interactive mode by default, removing prompts that would block automated git operations.
2025-11-14chore: bump rust-nostr v0.44DanConwayDev
fix breaking changes
2025-11-13feat(list): make list async and include sync report inlineDanConwayDev
copy relay fetching approach to async and reporting
2025-11-13refactor: simplify get_short_git_server_nameDanConwayDev
so it doesnt use the git_repo
2025-11-13fix: cli output line deletion during fetchDanConwayDev
also reduce the clutter in the cli output for grasp servers.
2025-10-20fix: grasp server detectionDanConwayDev
to ensure we dont try and fallback to ssh
2025-10-17chore: cargo updateDanConwayDev
update patches ahead of wider upgrade. clippy required some autofixes
2025-10-17fix: pr or pr update merge supportDanConwayDev
fixes to change attempted in 4fc659074ec5ced3cc0727cf1f3e6af082a189cc
2025-10-17feat(send): add `merge-base` tag to PR (Update)DanConwayDev
following its inclusion in the NIP-34 spec
2025-09-04feat(remote): use push PR non-interactive fallbackDanConwayDev
move the PR push code in 'ngit send' into lib. reuse the non-interactive fallbacks in git-remote-nostr
2025-08-18fix(remote): push handle annotated tags syncDanConwayDev
handle scenario when correct annotated tag is on a remote. peel to tip commit doesnt give the correct oid so we must use the annotated tag oid instead when comparing.
2025-08-18feat(sync): add `ref-name` param to limit syncDanConwayDev
limit syncing to a single reference with this new parameter. change instructions for out of sync remotes to use sync with this new option.
2025-08-07Merge branch 'add-prs-to-ngit-send'DanConwayDev
2025-08-07refactor: rename fn `is_grasp_server_in_list`DanConwayDev
to make it's purpose clearer
2025-08-06feat(send): custom ref for PR clone urlDanConwayDev
allow specifying ref for pushing PR to custom clone url
2025-08-05feat(send): push PR to custom clone urlDanConwayDev
if the repo doesnt list any grasp servers, or pushing to them fails
2025-08-05feat(send): support PR and PR update eventsDanConwayDev
send as a PR if the commit would make patches that are too big for nostr events. send as a PR update if the proposal is PR. send as a PR, revising a patch root, if patches would be too big. in tests `get_pretend_proposal_root_event` has to be a actual proposal with a tip, rather than just a cover letter, so we have replaced it.
2025-08-04refactor: move generate pr event fn into libDanConwayDev
for future use in `ngit send`
2025-08-04fix: `t` tag `revision-root` ~> `root-revision`DanConwayDev
NIP-34 specifies patch revisions should have a `t` tag of `root-revision` whereas we have been using `revision-root`. this fixes it and and handles events created with the incorrect tag.
2025-08-04refactor: abstract pr event generation & ref pushDanConwayDev
so that we can use it in `ngit send`
2025-08-01refactor: move patch size evaluation fn to libDanConwayDev
so we can use it in ngit as well as remote helper
2025-07-31fix: mention marker ~> q tag NIP-10 updateDanConwayDev
required for rust-nostr v0.43 update
2025-07-30fix(remote): support lightweight tagsDanConwayDev
I have now replicated the issue discussed in the last commit by overwriting my global git config item tag.gpgSign and setting it back to false, which is default the default. ngit was only supporting annotated tags and fiatjaf was pushing a lightweight tag. I'm confident that this will resolve the issue
2025-07-28fix(remote): push all tagsDanConwayDev
fiatjaf reported panic: ``` <commit-id> can not be successfully peeled into a tag (git_object_t=4). ``` when making a tag and running `git push --tags` I could not replicate but line it was coming from should use 'from' rather than 'to'.
2025-07-25refactor: move push helpers to libDanConwayDev
to enable forthcoming ngit sync cmd
2025-07-25refactor: move `utils` and `list` helpers to libDanConwayDev
to enable forthcoming `ngit sync` cmd
2025-07-25feat(pr): add pr and pr update merge supportDanConwayDev
as these events use `c` instead of `commit`
2025-07-23fix(remote): improve pr error messagesDanConwayDev
as a temporary measure
2025-07-23fix(remote): dont send pr and patches on upgradeDanConwayDev
when an upgrade to a pr is needed, dont also try and send patches
2025-07-23fix(remote): error if pushed proposal is emptyDanConwayDev
erorr if the pushed ref would produce a proposal with no patches, or if the ref is in origin/<main-or-master>
2025-07-23feat(pr): updates and pr as patch revisionDanConwayDev
issue a pull request update if pushing or force pushing a pull request issue a pull request with an e tag for original patch and close status for the original patch when pushing or force pushing against a patch when the new commits are too big to be iussed as patches
2025-07-23refactor(pr): rename functionsDanConwayDev
to reflect there new role of also pushing prs to git severs
2025-07-22feat(pr): generate pr event > oversized patchDanConwayDev
but only for new proposals
2025-07-16chore: bump nightly rustfmtDanConwayDev
to latest available and apply fmt fixes
2025-06-19refactor: rename ngit_relay to graspDanConwayDev
in function, params and variable names
2025-06-19rename ngit-relay to graspDanConwayDev
includes a change to a git config itme name
2025-06-19refactor: move build state functionDanConwayDev
in preparation for enforcing the inclusion of HEAD
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-23feat(push): avoid out of sync issues for ngit relayDanConwayDev
we need to be careful with git servers with their own permissions so a ngit user doesn't inadvertantly push changes on top of a another user who pushed directly to the git server without using the force flag. We dont have this problem with ngit-relay so we can always force push, even if the user didnt as nostr is the authority of state.
2025-05-23feat: only try http(s) for ngit-relaysDanConwayDev
otherwise it tries all the protocols and reprots on each
2025-05-09fix: always try git servers over other protocolsDanConwayDev
remove the code that guessed whether it was an authentication failure and gave up is it wasn't. this prevents it from trying http for push when ssh is not supported eg. ngit-relay
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-03feat(send): add description to event signing processDanConwayDev
resolving nostr:note1qu8le4a8qz9hhxy6q85txejcq0kln0r3s9vdtwrhtqwvauc6nxuqn3fj0z so it doesnt appear frozen when there are lots of events being signed by a remote signer
2025-04-01fix: allow soft push if not behind serverDanConwayDev
when nostr and the gitserver are out of sync an error was thrown when the git server was behind during soft push. It should only throw the error if its ahead of the tip to be pushed.
2025-04-01chore: bump rust-nostr v0.37 ~> v0.40DanConwayDev
and fix all of the breaking changes
2024-12-20fix(push): find existing proposalDanConwayDev
improve reliability of getting current logged in user to assess if they have submitted a proposal with the same name / branch name
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-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-13fix(push): refactor errorsDanConwayDev
comparing different versions of the nostr url string
2024-12-13refactor(push): split `run_push` functionDanConwayDev
as it was way too long
2024-12-12feat(push): merge event for applied commitsDanConwayDev
publish a merge event when the commit author signature and timestamp match patches within an open proposal
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-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-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-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-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-25chore: bump rust-nostr v0.35DanConwayDev
bump all rust-nostr packages
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-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): 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-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-12fix(remote): `push` status updatesDanConwayDev
push needs to use push_transfer_progress rather than transfer_progress
2024-09-12fix(remote): improve `push` status updatesDanConwayDev
to bring them more into line to the native git client
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): `list` apply protocols selectionDanConwayDev
used in fetch and tweak the error reporting
2024-09-04refactor(remote): split into modulesDanConwayDev
to make it easier to read