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-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
2024-09-03feat(remote): enhance nostr url formatDanConwayDev
add protocol and user parameters so that users can overide the protcol in the clone url and use specific protocols for fetch and push. see: nostr:nevent1qvzqqqqqqypzpgqgmmc409hm4xsdd74sf68a2uyf9pwel4g9mfdg8l5244t6x4jdqyxhwumn8ghj7mn0wvhxcmmvqqsp6a5ck6grd9lq0nu25dcfzggxde67erut76w0ucal5rcfq4y5gzc7gmpzm the override feature hasn't been implemented yet but this is an enabler. also added a new format so that macos (zsh) users don't have to use quotes: nostr://<optional-protocol>/npub123/<optional-relay>/identifer
2024-09-03feat(init): https as default clone url protocolDanConwayDev
so clone urls align to fetch rather than push. see discussion here: nostr:nevent1qvzqqqqx25pzpp59a0hkv5ecm45nrckvmu7pnk0sukssvly33u3wwzquy4v037hcqyxhwumn8ghj7mn0wvhxcmmvqqs2tdha5ymadffrkdprachsz6gsgsy6kc8gkntgq750mfn7u3aeu3g7xt8k9
2024-08-30feat(remote): fallback to ssh or httpsDanConwayDev
ssh clone urls are problematic as it requires authentication for fetching if users don't ave ssh keys setup for authentication with the git server. so cloning / fetching will fail. some users only authenticate using https and some only using ssh so we cant just use https for everything. this commit falls back to the other protocol if the first one failed for list, fetch or push
2024-08-30fix(remote): push pr shoudln't connect to serverDanConwayDev
as reported by arjen and tracked via: nostr:nevent1qvzqqqqx25pzpgqgmmc409hm4xsdd74sf68a2uyf9pwel4g9mfdg8l5244t6x4jdqy2hwumn8ghj7ur4wfcxcetjv4kxz7fwvdhk6qpqur335cpnlktwkhv43d8sdk24dpu79jnfuk9qyvk7kga6aencm77sj7e8fa as our tests are connecting to clone url in the file system its difficult to write a test for this
2024-08-30fix(remote): add auth for ssh `list` and `fetch`DanConwayDev
as authentication is always required if clone url is ssh
2024-08-28chore: bump rust-nostr to v0.34.0DanConwayDev
bump all rust-nostr packages I'm not sure I'm completely happy with allowing mutable_key_type but it is just run inside tests it appears that Event didn't have the Copy trait in v0.33.0 so I'm not sure why this warning suddenly appeared the timeout of client.get_events_of needed to be doubled which could indicate that an ineffiency has been introduced in v0.34.0 the primary motivation for upgrading now was to get this fix: nostr:nevent1qqsffl2ld678pjj77rh9k2g4edljmxdu6ew4lvgnglxv7jhu3ru8vvcpp4mhxue69uhkummn9ekx7mqzyzsq3hh327t0h2dq6matqn5064cgj2zanl2stkj6s0lg4t2h5dty6rm2ucm as I suspect it is also effecting other repositories eg nostr-profile-manager
2024-08-27fix(init): make maintainer.yaml copy clearerDanConwayDev
as this has reduced in importance as the user begins by selecting a trusted maintainer
2024-08-27fix(remote): clone failureDanConwayDev
clone fails due to error: `Error: failed to fetch objects in nostr state event from:` interestingly this error doesnt appear when the git url is a local repository in a file server so the tests dont fail
2024-08-20fix:(remote): only maintainers can pushDanConwayDev
and update / issue a state event. normal users can only push branches prefiex with pr/ and these go on nostr, not the git server.
2024-08-20fix(remote): `push` tags use correct oidDanConwayDev
use ^{} postfix for the commit id and without postfix for the tag id
2024-08-20feat: set proposal branch prefix to `pr/`DanConwayDev
from `prs/`. whilst plural reflects usage of `heads` and `tags` in git refs, singular is shorter and more reflective of usage of branch prefixes such as `feature/` `fix/`
2024-08-19feat(repo_ref): find coordinates from git remotesDanConwayDev
unless nostr.repo git config is set look for coodinates in git remotes that use the nostr format
2024-08-19refactor(repo_ref): split get_repo_coordinatesDanConwayDev
as the function is getting to long and we are about to add more to it
2024-08-19refactor(remote): move url_to_repo_coordinatesDanConwayDev
so it can be used by repo_ref which doesnt import git_remote_helper
2024-08-18feat(remote): `push` log merge event creationDanConwayDev
so the user knows that a merge commit event will be issued
2024-08-18feat(remote): `push` publish merge eventDanConwayDev
when a merge commit is being pushed that merges a patch in a proposal
2024-08-09feat(remote): `push` new proposalDanConwayDev
issue new proposal when new branch is pushed into `prs/*` namespace, which doesn't match an existing proposal
2024-08-09feat(remote): `push` to non-open proposalsDanConwayDev
will updates the proposal rather than trying to issue a new one
2024-08-09feat(remote): remove pr id postfix for authorsDanConwayDev
remove the (<short id>) post fix for remote proposal branches when the current user is the author this enables pushing new proposals without having to change the upstream branch in a way that remote helpers weren't designed to do
2024-08-08fix(send): patch countDanConwayDev
fix [PATCH n/n] when no cover letter and patches great than 1 fixes error where the first patch would be [PATCH] followed by [PATCH n/n]
2024-08-08feat(remote): `push` force push proposalDanConwayDev
will issue a proposal revision
2024-08-08fix(remote): `push` proposal use correct threadDanConwayDev
in the event of a proposal revisions
2024-08-08fix(remote) `push` proposals patch orderDanConwayDev
so that ancestors come first
2024-08-08fix(remote): `push` only send state when updatedDanConwayDev
not when only a proposal branch was being pushed
2024-08-08fix(remote): `fetch` unsigned commit changed HEADDanConwayDev
this caused `git clone` to fail and obviously changed HEAD broken by 406f6d70f6a71cbd8796268f6c36711e893ab9d5
2024-08-07fix(remote): `push` apply proposal permissionsDanConwayDev
so that only the author and repo maintainers can push to a proposal
2024-08-07feat(remote): `push` add commits to proposalDanConwayDev
push commits as patches to a proposal or propoal revision
2024-08-07fix(remote): `push` dont send rejected to serverDanConwayDev
dont send refspec to a git server which was rejected due to a conflict highlighted on a different git server
2024-08-07feat(remote): `fetch` applies proposal commitsDanConwayDev
that have been proposal tips returned by `list` can be found
2024-08-07refactor(git): apply patch to treeDanConwayDev
rather than head / working directory so that we can create commits in the background
2024-08-06fix(remote): `list` correct proposal refsDanConwayDev
as the `refs/heads/` prefix wasn't present
2024-08-06feat(remote): `fetch` ignore git servers `prs/*`DanConwayDev
as the namespace is reserved for nostr patches
2024-08-06feat(remote): `fetch` report on progressDanConwayDev
so that user knows what step we are on
2024-08-06feat(remote): `list` includes open proposalsDanConwayDev
and filters out other branches in `prs/*` namespace
2024-08-05fix(remote): `push` when server is ahead of nostrDanConwayDev
but behind local. correctly report on situation and allow push
2024-08-05feat(remote): print git url short nameDanConwayDev
instead of the full url so messages are easier to read
2024-08-05feat(remote): improve `list` warning copyDanConwayDev
so it is clearer and easier to read
2024-08-05feat(remote): improve `push` warning copyDanConwayDev
so it is clearer and easier to read
2024-08-05feat(remote): `push` handle out-of-sync serversDanConwayDev
1. don't attempt to push to a remote which is already up-to-date 2. don't attempt to delete branch on remote if it is already deleted 3. only push when out of sync if remote tip is ancestor of pushed commit 4. force push to remote if user force pushed and remote is in sync with nostr
2024-08-05refactr(remote) `list` abstract `list_from_remotes`DanConwayDev
In preparation for its reuse within `push`
2024-08-02feat(remote): `list` add git server statusDanConwayDev
so we have a status update and know which server is slow
2024-08-02feat(remote): improve warning copyDanConwayDev
so it is more concise and clear
2024-08-02feat(remote): warn when out of syncDanConwayDev
with git servers. this will also form the basis of preventing failed pushes
2024-08-02fix: identifer in parse `nostr://npub/identifer`DanConwayDev
as it was hardcoded to test value
2024-08-01Revert "refactor: fix `stderr` ~> `stdout`"DanConwayDev
This reverts commit 3d2e031294b467be725a4ac5f5e65e029d25699a.
2024-08-01fix(remote): display nostr fetch reportDanConwayDev
use stderr to write lines that get displayed when run as a git-remote-helper
2024-08-01Revert "fix(remote): display nostr fetch report"DanConwayDev
This reverts commit 6b63f150ba9e7c69bf83bcbd24543051c765c9f6.
2024-08-01fix(remote): display nostr fetch reportDanConwayDev
use `stderr` to write lines that get displayed when run as a git-remote-helper
2024-08-01refactor: fix `stderr` ~> `stdout`DanConwayDev
as `stderr` is being used when it shouldn't be
2024-08-01Revert "clear 'fetching updates..' when done"DanConwayDev
This reverts commit 4a38d5f4179114fce60f84c4694284a49f648c64.
2024-08-01clear 'fetching updates..' when doneDanConwayDev
unless there were errors and detailed report doesnt clear
2024-08-01test(remote): fix url `from_naddr`DanConwayDev
as rust-nostr doesn't add trailing slash to relays
2024-08-01feat(remote): `--version` get from cargo packageDanConwayDev
instead of manually set. aligns with ngit version.
2024-08-01feat(remote): add `nostr://npub/identifer`DanConwayDev
support with optional relays as query parameter
2024-08-01test(remote): add nostr url parse testDanConwayDev
in prep for supporting new format
2024-08-01feat(remote): `fetch` fallsback to other serversDanConwayDev
listed in the announcement `clone` tag
2024-08-01feat(remote): `push` to all `clone` serversDanConwayDev
initially we push to the first server, if successful update the state event, then siliently push to the others and silently fail
2024-08-01fix(remote): download oids not refstrDanConwayDev
so that if the git server is ahead of the state announcement, only the commits in the state annoucement will be downloaded
2024-08-01feat(remote): `fetch` uses state eventDanConwayDev
and falls back to git server is state event cant be found
2024-07-31fix(remote): updating `push` state eventDanConwayDev
ensure refs are included in state event use `HashMap` to improve `RepoState` struct
2024-07-31feat(remote): `push` issues state eventDanConwayDev
if no previous state events can be found it replicates git server otherwise it just updates pushed value
2024-07-30refactor: add struct `RepoState`DanConwayDev
to more easily access state details
2024-07-30refactor(remote): improve readabilityDanConwayDev
and move code identifying git server url into `list`, `fetch` and `push`.
2024-07-29refactor(remote): abstract `list`DanConwayDev
in preparation for managing state via nostr
2024-07-29feat(fetch): fetch state announcementsDanConwayDev
if multiple maintainers produce state events with the same timestamp, the event with the largest event_id will be used
2024-07-28fix(remote): only update ref when `push` succeedsDanConwayDev
only update remote ref when push was successful
2024-07-28refactor(remote): abstract `fetch` and `push`DanConwayDev
so main doesn't grow too large
2024-07-28feat(remote): report on `push`DanConwayDev
pass outcome back to git to enable reporting
2024-07-28feat(remote): batch `push` and `fetch`DanConwayDev
requests so that the git_server is called once rather than many time in serial
2024-07-28refactor(remote): allow more `push` callbacksDanConwayDev
by using GitAuthenticatior credential callback directly rather than its `push` method
2024-07-26fix(remote): push updates remote refsDanConwayDev
push was not updating remote refs after the anon remote was being pushed
2024-07-26fix(remote): authenticate pushesDanConwayDev
in the future we could implement our own credentials callback function to remove the dependancy
2024-07-26feat(remote): add nostr git remote helperDanConwayDev
as a simple proxy to the first git server listed in announcement parse clone url as `nostr://naddr123...`
2024-07-25fix(init): add missing identifier to yamlDanConwayDev
add missing or updated identifier to maintainers.yaml as we were not checking whether it has changed or added also update if relays do not match
2024-07-24refactor: use nip34 kinds from rust-nostrDanConwayDev
instead of Kind::Custom(u16) as v33 of rust-nostr introduced them
2024-07-24feat(push): `--force` tries non-interactivelyDanConwayDev
if branch is ahead of main or master
2024-07-23feat(list): unique proposal branch namesDanConwayDev
to prevent accidental name conflicts. also moved to prs/* namespace `pull` and `push` integration tests are intermitantly failing to end at least for `push` they work when run individually but not when run together
2024-07-22fix: typos and improve copyDanConwayDev
when finding repo announcements add a hint to find naddr on gitworkshop.dev
2024-07-22chore: bump rust-nostr to v0.33.0DanConwayDev
bump all rust-nostr packages move from using patched nip46 nip05 function to profile function in v33 fix send_events_to error message
2024-07-22fix(pull): find proposal, root not revisionDanConwayDev
when looking for proposal roots 'pull' was not filtering out proposal revisions issue identified in failing test, which it now passes
2024-07-19feat: intergrate `fetch` into `init`DanConwayDev
as part of a project to use fetch and the stored cache everywhere
2024-07-19feat: save created events to cacheDanConwayDev
as soon as they are successfully sent to at least one relay
2024-07-19feat: integrate `fetch` into `list`DanConwayDev
as part of a project to use fetch and the stored cache everywhere
2024-07-19feat: integrate `fetch` into `pull`DanConwayDev
the last set of pull integration test fails: when_latest_event_rebases_branch we are planning on replacing pull so I'm not sure whether it is worth fixing
2024-07-19feat: integrate `fetch` into `push`DanConwayDev
as part of a project to use `fetch` and the stored cache everywhere
2024-07-19feat(send): add relay hints to linkDanConwayDev
to proposal which is displayed at the end of the functon
2024-07-19feat: intergrate `fetch` into `send`DanConwayDev
reworking the tests and test suite as appropriate
2024-07-19fix(fetch): error when user profile not presentDanConwayDev
when fetching a user profile from user relays it throw an error when an existing version of the profile wasn't found
2024-07-19fix(fetch): absent repo addr infinite loopDanConwayDev
prevent an infinite loop when a new maintainer is identified that hasn't issued a repo event yet make it clear when repo_coordinates must not have relays
2024-07-18fix(fetch): dont report old profile as updateDanConwayDev
as any profile event was being recorded as a update
2024-07-18fix(fetch): get profiles of fresh contributorsDanConwayDev
rather than ending the loop without fetching them
2024-07-18fix(fetch): new coodinates infinite loopDanConwayDev
prevent infinite loop when new coordinates are found
2024-07-18refactor(fetch): move database cacheDanConwayDev
into cache directory rather than config directories also removed CodeCollaboration from path as this isn't helpful whilst this is a breaking change, the cache was only introduced during development of this version so it is not highlighted as such
2024-07-18fix(fetch): report profile updates as updatesDanConwayDev
rather than as new profiles
2024-07-18improve copyDanConwayDev
add a message for the temporary situation where a maintainers.yaml exists without an identifier listed
2024-07-18refactor: fetch some profiles from user relaysDanConwayDev
add the ability to fetch more than just the current user from their user write relays