diff options
Diffstat (limited to 'src/bin')
| -rw-r--r-- | src/bin/git_remote_nostr/push.rs | 14 | ||||
| -rw-r--r-- | src/bin/ngit/sub_commands/init.rs | 1 |
2 files changed, 15 insertions, 0 deletions
diff --git a/src/bin/git_remote_nostr/push.rs b/src/bin/git_remote_nostr/push.rs index c4953f8..56bf177 100644 --- a/src/bin/git_remote_nostr/push.rs +++ b/src/bin/git_remote_nostr/push.rs | |||
| @@ -199,6 +199,20 @@ async fn create_and_publish_events( | |||
| 199 | if proposal_refspecs.is_empty() { | 199 | if proposal_refspecs.is_empty() { |
| 200 | return Ok((vec![], true)); | 200 | return Ok((vec![], true)); |
| 201 | } | 201 | } |
| 202 | } else if repo_ref | ||
| 203 | .maintainers_without_annoucnement | ||
| 204 | .clone() | ||
| 205 | .is_some_and(|ms| ms.contains(&user_ref.public_key)) | ||
| 206 | { | ||
| 207 | for refspec in git_server_refspecs { | ||
| 208 | let (_, to) = refspec_to_from_to(refspec).unwrap(); | ||
| 209 | eprintln!( | ||
| 210 | "error {to} you must run `ngit init` before pushing updates. you've been offered maintainership but you must accept it before pushing", | ||
| 211 | ); | ||
| 212 | } | ||
| 213 | if proposal_refspecs.is_empty() { | ||
| 214 | return Ok((vec![], true)); | ||
| 215 | } | ||
| 202 | } | 216 | } |
| 203 | 217 | ||
| 204 | let mut events = vec![]; | 218 | let mut events = vec![]; |
diff --git a/src/bin/ngit/sub_commands/init.rs b/src/bin/ngit/sub_commands/init.rs index 1d9fda0..aea4f8b 100644 --- a/src/bin/ngit/sub_commands/init.rs +++ b/src/bin/ngit/sub_commands/init.rs | |||
| @@ -703,6 +703,7 @@ pub async fn launch(cli_args: &Cli, args: &SubCommandArgs) -> Result<()> { | |||
| 703 | relays: relays.clone(), | 703 | relays: relays.clone(), |
| 704 | blossoms, | 704 | blossoms, |
| 705 | trusted_maintainer: user_ref.public_key, | 705 | trusted_maintainer: user_ref.public_key, |
| 706 | maintainers_without_annoucnement: None, | ||
| 706 | maintainers: maintainers.clone(), | 707 | maintainers: maintainers.clone(), |
| 707 | events: HashMap::new(), | 708 | events: HashMap::new(), |
| 708 | nostr_git_url: None, | 709 | nostr_git_url: None, |