From ee0e048ed9c244449ffb12284e444933eb67e118 Mon Sep 17 00:00:00 2001 From: DanConwayDev Date: Fri, 13 Dec 2024 12:02:15 +0000 Subject: test(push): merge event for applied commits publish a merge event when the commit author signature and timestamp match patches within an open proposal --- test_utils/src/lib.rs | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'test_utils') diff --git a/test_utils/src/lib.rs b/test_utils/src/lib.rs index 3ac171b..5079c26 100644 --- a/test_utils/src/lib.rs +++ b/test_utils/src/lib.rs @@ -1212,9 +1212,9 @@ pub fn cli_tester_create_proposals() -> Result { pub fn cli_tester_create_proposal_branches_ready_to_send() -> Result { let git_repo = GitTestRepo::default(); git_repo.populate()?; - create_and_populate_branch(&git_repo, FEATURE_BRANCH_NAME_1, "a", false)?; - create_and_populate_branch(&git_repo, FEATURE_BRANCH_NAME_2, "b", false)?; - create_and_populate_branch(&git_repo, FEATURE_BRANCH_NAME_3, "c", false)?; + create_and_populate_branch(&git_repo, FEATURE_BRANCH_NAME_1, "a", false, None)?; + create_and_populate_branch(&git_repo, FEATURE_BRANCH_NAME_2, "b", false, None)?; + create_and_populate_branch(&git_repo, FEATURE_BRANCH_NAME_3, "c", false, None)?; Ok(git_repo) } @@ -1223,6 +1223,7 @@ pub fn create_and_populate_branch( branch_name: &str, prefix: &str, only_one_commit: bool, + commiter: Option<&Signature>, ) -> Result<()> { test_repo.checkout("main")?; test_repo.create_branch(branch_name)?; @@ -1239,7 +1240,7 @@ pub fn create_and_populate_branch( ) .unwrap(), ), - None, + commiter, )?; if !only_one_commit { let file_name = format!("{}4.md", prefix); @@ -1254,7 +1255,7 @@ pub fn create_and_populate_branch( ) .unwrap(), ), - None, + commiter, )?; } Ok(()) @@ -1292,7 +1293,7 @@ pub fn cli_tester_create_proposal( cover_letter_title_and_description: Option<(&str, &str)>, in_reply_to: Option, ) -> Result<()> { - create_and_populate_branch(test_repo, branch_name, prefix, false)?; + create_and_populate_branch(test_repo, branch_name, prefix, false, None)?; std::thread::sleep(std::time::Duration::from_millis(1000)); if let Some(in_reply_to) = in_reply_to { let mut p = CliTester::new_from_dir( -- cgit v1.2.3