diff --git a/tooling/compliance/src/checks.rs b/tooling/compliance/src/checks.rs index da8bb7d24d..0ee8eed808 100644 --- a/tooling/compliance/src/checks.rs +++ b/tooling/compliance/src/checks.rs @@ -110,7 +110,10 @@ impl<'a> Reporter<'a> { } /// Method that checks every commit for compliance - async fn check_commit(&self, commit: &CommitDetails) -> Result { + pub async fn check_commit( + &self, + commit: &CommitDetails, + ) -> Result { let Some(pr_number) = commit.pr_number() else { return Err(ReviewFailure::NoPullRequestFound); }; diff --git a/tooling/compliance/src/git.rs b/tooling/compliance/src/git.rs index 424032d035..e2581b1c7f 100644 --- a/tooling/compliance/src/git.rs +++ b/tooling/compliance/src/git.rs @@ -127,6 +127,17 @@ pub struct CommitDetails { body: String, } +impl CommitDetails { + pub fn new(sha: CommitSha, author: Committer, title: String, body: String) -> Self { + Self { + sha, + author, + title, + body, + } + } +} + #[derive(Debug, Clone, PartialEq, Eq)] pub struct Committer { name: String,