From 8fff6fdce267fbcf9cc297056a2000c100c7f4e1 Mon Sep 17 00:00:00 2001 From: DanConwayDev Date: Wed, 24 Jan 2024 00:00:00 +0000 Subject: [PATCH] feat(ngit): add ngit guide and install pointers as ngit and gitworkshop are so intertwined there should be pointers to encourage users to install and work with the ngit client alongside gitworkshop --- src/routes/+page.svelte | 49 +++++++++-- src/routes/ngit/+page.svelte | 85 +++++++++++++++++++ .../repo/[repo_id]/pr/[pr_id]/+page.svelte | 24 ++++++ 3 files changed, 151 insertions(+), 7 deletions(-) create mode 100644 src/routes/ngit/+page.svelte diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte index f9a860b..3581b6f 100644 --- a/src/routes/+page.svelte +++ b/src/routes/+page.svelte @@ -5,13 +5,48 @@
-
-

- gitworkshop.dev -

-

permissionless alternative to GitHub over nostr

+
+
+

+ gitworkshop.dev +

+

+ permissionless alternative to GitHub over nostr +

+
+
+
+
+
+

+ pairs with ngit cli +

+
+
+ a command-line tool to create, + list and + apply PRs and patches +
+ + +
+
+
+
+
+
diff --git a/src/routes/ngit/+page.svelte b/src/routes/ngit/+page.svelte new file mode 100644 index 0000000..37846da --- /dev/null +++ b/src/routes/ngit/+page.svelte @@ -0,0 +1,85 @@ + + + +
+

ngit

+

+ a command-line tool to create, list and apply PRs and patches to git + repositories via nostr events. +

+ It is designed to work seemlessly with this site gitworkshop.dev. + +

Install

+

+ If you have cargo installed runcargo install ngit. + Alternatively download: +

+ Linux + Mac + Windows + v.0.1.0 +

add the binary to a directory from which it can be run globally.

+

Commands

+

+ All commands should be run from the directory of the git repository +

+

+ ngit prs create + use this when you are on a feature branch to propose it gets merged into + the remote branch by repository maintainer. +

+

+ It creates a PR event and patch events for each commit that isn't + also in the main or master branch. +

+

+ ngit prs list + fetches a selectable list of open PRs and, if one is selected and the + repository is clean, will create a branch for it and apply the commits. + If the branch already exists it will pull any updates. +

+

+ ngit pull + if the repository is currently in a branch related to an existing PR, + it will pull any updates from nostr. +

+

+ ngit push + if the repository is currently in a branch related to an existing PR, + it will create patch events for any new commits. +

+

+ ngit claim + issue a repository nostr event which lists it on gitworkshop.dev and + indicates you are accepting patches and PRs via nostr. +

+

+ It also creates an optional maintainers.yaml file in the root of your repo that lists maintainers and relays. If + commited it will make it smoother for contributors to find your repository + event and also makes any future transfer of repository ownership easier. +

+
+
diff --git a/src/routes/repo/[repo_id]/pr/[pr_id]/+page.svelte b/src/routes/repo/[repo_id]/pr/[pr_id]/+page.svelte index c7cfce4..e7efdd8 100644 --- a/src/routes/repo/[repo_id]/pr/[pr_id]/+page.svelte +++ b/src/routes/repo/[repo_id]/pr/[pr_id]/+page.svelte @@ -65,6 +65,30 @@
{$selected_pr_full.summary.descritpion}
+ {#if $selected_pr_full.pr_event}