diff options
Diffstat (limited to 'src/lib/git_events.rs')
| -rw-r--r-- | src/lib/git_events.rs | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/lib/git_events.rs b/src/lib/git_events.rs index 79f5772..bbfcbea 100644 --- a/src/lib/git_events.rs +++ b/src/lib/git_events.rs | |||
| @@ -376,11 +376,13 @@ pub fn event_tag_from_nip19_or_hex( | |||
| 376 | } | 376 | } |
| 377 | } | 377 | } |
| 378 | 378 | ||
| 379 | #[allow(clippy::too_many_arguments)] | ||
| 379 | pub fn generate_unsigned_pr_or_update_event( | 380 | pub fn generate_unsigned_pr_or_update_event( |
| 380 | git_repo: &Repo, | 381 | git_repo: &Repo, |
| 381 | repo_ref: &RepoRef, | 382 | repo_ref: &RepoRef, |
| 382 | signing_public_key: &PublicKey, | 383 | signing_public_key: &PublicKey, |
| 383 | root_proposal: Option<&Event>, | 384 | root_proposal: Option<&Event>, |
| 385 | title_description_overide: &Option<(String, String)>, | ||
| 384 | commit: &Sha1Hash, | 386 | commit: &Sha1Hash, |
| 385 | clone_url_hint: &[&str], | 387 | clone_url_hint: &[&str], |
| 386 | mentions: &[nostr::Tag], | 388 | mentions: &[nostr::Tag], |
| @@ -395,13 +397,17 @@ pub fn generate_unsigned_pr_or_update_event( | |||
| 395 | None | 397 | None |
| 396 | }; | 398 | }; |
| 397 | 399 | ||
| 398 | let title = if let Some(cl) = &root_patch_cover_letter { | 400 | let title = if let Some((title, _)) = &title_description_overide { |
| 401 | title.clone() | ||
| 402 | } else if let Some(cl) = &root_patch_cover_letter { | ||
| 399 | cl.title.clone() | 403 | cl.title.clone() |
| 400 | } else { | 404 | } else { |
| 401 | git_repo.get_commit_message_summary(commit)? | 405 | git_repo.get_commit_message_summary(commit)? |
| 402 | }; | 406 | }; |
| 403 | 407 | ||
| 404 | let description = if let Some(cl) = &root_patch_cover_letter { | 408 | let description = if let Some((_, description)) = &title_description_overide { |
| 409 | description.clone() | ||
| 410 | } else if let Some(cl) = &root_patch_cover_letter { | ||
| 405 | cl.description.clone() | 411 | cl.description.clone() |
| 406 | } else { | 412 | } else { |
| 407 | let mut description = git_repo.get_commit_message(commit)?.trim().to_string(); | 413 | let mut description = git_repo.get_commit_message(commit)?.trim().to_string(); |