diff options
| author | DanConwayDev <DanConwayDev@protonmail.com> | 2024-01-23 00:00:00 +0000 |
|---|---|---|
| committer | DanConwayDev <DanConwayDev@protonmail.com> | 2024-01-23 00:00:00 +0000 |
| commit | 7e1f3a03ea4dea7b6aec39a555ce3caf22b88d8b (patch) | |
| tree | eacd7f6a3efc8c49181357f5e4c6b3dd17d3bb9d | |
| parent | e8ac3b6b49c6ec38cf4694dc4cb08f12c684ed7b (diff) | |
fix(prs-create): remove d tag from pr event
this shouldn't be present
| -rw-r--r-- | src/sub_commands/prs/create.rs | 1 | ||||
| -rw-r--r-- | tests/prs_create.rs | 20 |
2 files changed, 0 insertions, 21 deletions
diff --git a/src/sub_commands/prs/create.rs b/src/sub_commands/prs/create.rs index e5d6262..ced1edd 100644 --- a/src/sub_commands/prs/create.rs +++ b/src/sub_commands/prs/create.rs | |||
| @@ -314,7 +314,6 @@ pub fn generate_pr_and_patch_events( | |||
| 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![ | 316 | let mut pr_tags = vec![ |
| 317 | Tag::Identifier(root_commit.to_string()), | ||
| 318 | Tag::Reference(format!("r-{root_commit}")), | 317 | Tag::Reference(format!("r-{root_commit}")), |
| 319 | Tag::Name(title.to_string()), | 318 | Tag::Name(title.to_string()), |
| 320 | Tag::Description(description.to_string()), | 319 | Tag::Description(description.to_string()), |
diff --git a/tests/prs_create.rs b/tests/prs_create.rs index d00bb9f..f473683 100644 --- a/tests/prs_create.rs +++ b/tests/prs_create.rs | |||
| @@ -406,26 +406,6 @@ mod sends_pr_and_2_patches_to_3_relays { | |||
| 406 | 406 | ||
| 407 | mod pr_tags { | 407 | mod pr_tags { |
| 408 | use super::*; | 408 | use super::*; |
| 409 | #[test] | ||
| 410 | #[serial] | ||
| 411 | fn pr_tags_repo_commit_as_identifier() -> Result<()> { | ||
| 412 | let (_, _, r53, r55, r56) = futures::executor::block_on(prep_run_create_pr())?; | ||
| 413 | let root_commit = GitTestRepo::default().initial_commit()?; | ||
| 414 | |||
| 415 | for relay in [&r53, &r55, &r56] { | ||
| 416 | let pr_event: &nostr::Event = relay | ||
| 417 | .events | ||
| 418 | .iter() | ||
| 419 | .find(|e| e.kind.as_u64().eq(&PR_KIND)) | ||
| 420 | .unwrap(); | ||
| 421 | |||
| 422 | // root commit identifier tag | ||
| 423 | assert!(pr_event.tags.iter().any( | ||
| 424 | |t| t.as_vec()[0].eq("d") && t.as_vec()[1].eq(&format!("{}", root_commit)) | ||
| 425 | )); | ||
| 426 | } | ||
| 427 | Ok(()) | ||
| 428 | } | ||
| 429 | 409 | ||
| 430 | #[test] | 410 | #[test] |
| 431 | #[serial] | 411 | #[serial] |