From ba2836c35d37d4f262fd65fedfc27be8e7ed2a93 Mon Sep 17 00:00:00 2001 From: Silberengel Date: Thu, 19 Feb 2026 20:40:49 +0100 Subject: [PATCH] update docs Nostr-Signature: 23e1028e3df47a06cee8aaee5da173a73d1317bc6bede818cc002fa002041175 573634b648634cbad10f2451776089ea21090d9407f715e83c577b4611ae6edc ac48caad27206d5e1fd7fccbe6afe77ff0a7dd14d4c07b07a91caac1f91f9482960e019531fdb66025c90a4cda6ba0b570ddfe3f64eb7b979e06daeb551b1dad --- docs/34.md | 43 ++++++++++++++++++++++++++++- docs/tutorial.md | 52 ++++++++++++++++++++++------------- nostr/commit-signatures.jsonl | 1 + 3 files changed, 76 insertions(+), 20 deletions(-) diff --git a/docs/34.md b/docs/34.md index 602ed92..a9c4dd5 100644 --- a/docs/34.md +++ b/docs/34.md @@ -256,8 +256,9 @@ NIP-34 is the core NIP that GitRepublic implements. All repository functionality GitRepublic uses repository announcements to: - **Discover Repositories**: The landing page fetches all kind 30617 events to display available repositories - **Repository Creation**: Users create repository announcements via the signup page -- **Repository Updates**: Settings changes update the repository announcement event +- **Repository Updates**: Repository information updates are done via the signup page, which updates the repository announcement event - **Fork Detection**: Forks are identified by `a` tags pointing to the original repository +- **Offline Papertrail**: Repository announcements are saved to the repository itself (as `.nostr-announcement`) for offline verification ### Pull Requests (Kind 1618) @@ -283,8 +284,48 @@ GitRepublic uses repository announcements to: - **Branch Tracking**: Optional repository state events track branch and tag positions - **State Updates**: Repository state can be updated to reflect current branch/tag positions +### Ownership Transfers (Kind 1641) + +GitRepublic implements ownership transfers using kind 1641 events: + +- **Transfer Initiation**: Current owner creates a kind 1641 event with the new owner's pubkey in the `p` tag +- **Event Publishing**: Transfer events are published to Nostr relays for online papertrail +- **Repository Storage**: Transfer events are saved to the repository (as `.nostr-ownership-transfer-{eventId}.json`) for offline papertrail +- **New Owner Notification**: New owners are notified when they log into GitRepublic web +- **Transfer Completion**: New owner completes the transfer by publishing a new repository announcement (kind 30617) +- **Verification**: The transfer is complete when the new owner's announcement is published and saved to the repository + +**Transfer Workflow**: +1. Current owner initiates transfer by creating and publishing a kind 1641 event +2. Transfer event is saved to the repository for offline verification +3. New owner is notified via GitRepublic web interface +4. New owner publishes a new repository announcement (kind 30617) to complete the transfer +5. New announcement is saved to the repository for offline verification +6. Transfer is complete and repository ownership is verified + +### Ownership Transfers (Kind 1641) + +GitRepublic implements ownership transfers using kind 1641 events: + +- **Transfer Initiation**: Current owner creates a kind 1641 event with the new owner's pubkey in the `p` tag +- **Event Publishing**: Transfer events are published to Nostr relays for online papertrail +- **Repository Storage**: Transfer events are saved to the repository (as `.nostr-ownership-transfer-{eventId}.json`) for offline papertrail +- **New Owner Notification**: New owners are notified when they log into GitRepublic web +- **Transfer Completion**: New owner completes the transfer by publishing a new repository announcement (kind 30617) +- **Verification**: The transfer is complete when the new owner's announcement is published and saved to the repository + +**Transfer Workflow**: +1. Current owner initiates transfer by creating and publishing a kind 1641 event +2. Transfer event is saved to the repository for offline verification +3. New owner is notified via GitRepublic web interface +4. New owner publishes a new repository announcement (kind 30617) to complete the transfer +5. New announcement is saved to the repository for offline verification +6. Transfer is complete and repository ownership is verified + **Implementation**: - Repository announcements: `src/routes/signup/+page.svelte`, `src/lib/services/nostr/repo-polling.ts` - Pull requests: `src/lib/services/nostr/prs-service.ts` - Issues: `src/lib/services/nostr/issues-service.ts` - Status events: Used throughout PR and issue management +- Ownership transfers: `src/routes/api/repos/[npub]/[repo]/transfer/+server.ts`, `src/lib/services/nostr/ownership-transfer-service.ts` +- Ownership transfers: `src/routes/api/repos/[npub]/[repo]/transfer/+server.ts`, `src/lib/services/nostr/ownership-transfer-service.ts` \ No newline at end of file diff --git a/docs/tutorial.md b/docs/tutorial.md index 90d8617..46cc367 100644 --- a/docs/tutorial.md +++ b/docs/tutorial.md @@ -12,7 +12,7 @@ Welcome to GitRepublic! This comprehensive guide will walk you through everythin 6. [Pull Requests](#pull-requests) 7. [Issues](#issues) 8. [Forking Repositories](#forking-repositories) -9. [Repository Settings](#repository-settings) +9. [Updating Repository Information](#updating-repository-information) 10. [Collaboration Features](#collaboration-features) 11. [Best Practices](#best-practices) 12. [Troubleshooting](#troubleshooting) @@ -392,57 +392,71 @@ To keep your fork up to date with the original repository: --- -## Repository Settings +## Updating Repository Information -Access repository settings by clicking "Settings" on your repository page. +To update your repository information, navigate to the signup page with your repository details pre-filled. + +### Accessing the Update Form + +1. Navigate to your repository page +2. Click "Settings" (if you're the owner or a maintainer) +3. You'll be redirected to the signup page with all current repository information pre-filled ### Privacy Settings - **Public**: Anyone can view and clone your repository - **Private**: Only owners and maintainers can access +You can change the privacy setting by checking or unchecking the "Private Repository" option in the update form. + ### Maintainer Management Add maintainers who can: - Push to the repository - Merge pull requests - Manage issues -- Update repository settings +- Update repository information **To add a maintainer**: -1. Go to Settings -2. Enter the maintainer's npub -3. Click "Add Maintainer" +1. Access the update form (via Settings link) +2. Enter the maintainer's npub in the maintainers field +3. Click "Add Maintainer" to add additional maintainer fields +4. Save changes **To remove a maintainer**: -1. Go to Settings -2. Find the maintainer in the list -3. Click "Remove" +1. Access the update form +2. Remove the maintainer's npub from the maintainers field +3. Save changes ### Repository Description Update your repository description: -1. Go to Settings +1. Access the update form 2. Edit the description field 3. Save changes ### Clone URLs Add multiple clone URLs to sync your repository to other git hosts: -1. Go to Settings -2. Add clone URLs (one per line) +1. Access the update form +2. Add clone URLs (one per field) 3. Save changes When you push, GitRepublic will automatically sync to all configured remotes. ### Ownership Transfer -Transfer repository ownership to another user: -1. Go to Settings -2. Enter the new owner's npub -3. Confirm the transfer +Transfer repository ownership to another user using the transfer workflow: + +1. **Initiate Transfer**: On your repository page, click "Transfer Ownership" +2. **Enter New Owner**: Provide the new owner's npub +3. **Sign and Publish**: The transfer event is signed and published to Nostr relays +4. **Save to Repository**: The transfer event is saved to your repository for offline papertrail +5. **New Owner Notification**: The new owner will be notified when they log into GitRepublic web +6. **Complete Transfer**: The new owner completes the transfer by publishing a new repository announcement +7. **Verification**: The transfer is complete and the repository is verified -**Important**: Ownership transfers are permanent and create a chain of ownership events. The new owner will have full control. +**Important**: Ownership transfers are permanent and create a chain of ownership events. The new owner will have full control. Both the transfer event and the new repository announcement are published to relays and saved to the repository for both online and offline papertrail. --- @@ -677,4 +691,4 @@ Congratulations! You now know how to use GitRepublic for decentralized git hosti - Collaboration happens through Nostr events - Security is handled via NIP-07 and NIP-98 -Happy coding! 🚀 +Happy coding! diff --git a/nostr/commit-signatures.jsonl b/nostr/commit-signatures.jsonl index b07e3cf..058c5e9 100644 --- a/nostr/commit-signatures.jsonl +++ b/nostr/commit-signatures.jsonl @@ -8,3 +8,4 @@ {"kind":1640,"pubkey":"573634b648634cbad10f2451776089ea21090d9407f715e83c577b4611ae6edc","created_at":1771520523,"tags":[["author","Silberengel","silberengel7@protonmail.com"],["message","fix contrast"]],"content":"Signed commit: fix contrast","id":"210177972a67b45a8c56494f2423987ffd30fc5594c539ed6a9f23c0f0992d21","sig":"c3122ebc0055f5a7145d394b9461b811b6e37a7423493d62a6debf7078c006435352e2e2a4259fce6a8a13486bdd137e2e7a49bfdf512a37a73d0c36d405ff2f"} {"kind":1640,"pubkey":"573634b648634cbad10f2451776089ea21090d9407f715e83c577b4611ae6edc","created_at":1771522633,"tags":[["author","Silberengel","silberengel7@protonmail.com"],["message","adjusting api for themes"]],"content":"Signed commit: adjusting api for themes","id":"c6125da849827ef6481eed3588231630470289db0176066fc9c1e044f839976b","sig":"7a943b493af9d7108a26fb3bad8166e58ba2ed08eb6c24c178775387620601e6a130ce8a0f344a79e637fc4e75ed2e6d308a242101b14bdb38ccb901c09ff13f"} {"kind":1640,"pubkey":"573634b648634cbad10f2451776089ea21090d9407f715e83c577b4611ae6edc","created_at":1771529356,"tags":[["author","Silberengel","silberengel7@protonmail.com"],["message","update transfer workflow"]],"content":"Signed commit: update transfer workflow","id":"5d6d6909666a881f88f240389d30f5bedd36dba5d69a9d24dca86557b0098867","sig":"d13caca8b3e1009469e28c352bdfacf5eb78e2e9f5ac80c8511a9e2c6c5ac7031b83374d2d91b93b8018b5a3402e3e9c7114332da89ee2cb039f64aa3207f3f4"} +{"kind":1640,"pubkey":"573634b648634cbad10f2451776089ea21090d9407f715e83c577b4611ae6edc","created_at":1771529918,"tags":[["author","Silberengel","silberengel7@protonmail.com"],["message","get rid of settings page\nimplement transfer on cli and api"]],"content":"Signed commit: get rid of settings page\nimplement transfer on cli and api","id":"a312986953d2b408aae10a51ec29b51aca8a2e6396e5b5ec7fd969bb12c5b882","sig":"09b7bff4ce945ac120a413246a0a6111bf9afc14e570524f1e2e4f8ee8e22a2a2c71fd00fedb836e030245d3cbc1e42fcb8c5bde7c643fde2551582f63942851"}