diff options
Diffstat (limited to 'src/sub_commands/prs')
| -rw-r--r-- | src/sub_commands/prs/create.rs | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/src/sub_commands/prs/create.rs b/src/sub_commands/prs/create.rs index 655978e..ce30c12 100644 --- a/src/sub_commands/prs/create.rs +++ b/src/sub_commands/prs/create.rs | |||
| @@ -313,15 +313,23 @@ fn generate_pr_and_patch_events( | |||
| 313 | .get_root_commit(to_branch) | 313 | .get_root_commit(to_branch) |
| 314 | .context("failed to get root commit of the repository")?; | 314 | .context("failed to get root commit of the repository")?; |
| 315 | 315 | ||
| 316 | let mut pr_tags = vec![ | ||
| 317 | Tag::Reference(format!("r-{root_commit}")), | ||
| 318 | Tag::Name(title.to_string()), | ||
| 319 | Tag::Description(description.to_string()), | ||
| 320 | ]; | ||
| 321 | |||
| 322 | if let Ok(branch_name) = git_repo.get_checked_out_branch_name() { | ||
| 323 | pr_tags.push(Tag::Generic( | ||
| 324 | TagKind::Custom("branch-name".to_string()), | ||
| 325 | vec![branch_name], | ||
| 326 | )); | ||
| 327 | } | ||
| 328 | |||
| 316 | let pr_event = EventBuilder::new( | 329 | let pr_event = EventBuilder::new( |
| 317 | nostr::event::Kind::Custom(PR_KIND), | 330 | nostr::event::Kind::Custom(PR_KIND), |
| 318 | format!("{title}\r\n\r\n{description}"), | 331 | format!("{title}\r\n\r\n{description}"), |
| 319 | &[Tag::Reference(format!("r-{root_commit}"))], | 332 | &pr_tags, |
| 320 | // TODO: suggested branch name | ||
| 321 | // Tag::Generic( | ||
| 322 | // TagKind::Custom("suggested-branch-name".to_string()), | ||
| 323 | // vec![], | ||
| 324 | // ), | ||
| 325 | // TODO: add Repo event as root | 333 | // TODO: add Repo event as root |
| 326 | // TODO: people tag maintainers | 334 | // TODO: people tag maintainers |
| 327 | // TODO: add relay tags | 335 | // TODO: add relay tags |