compliance: Expose some more methods (#53831)

They will again come in handy for the GitHub worker.

Release Notes:

- N/A
This commit is contained in:
Finn Evers authored and GitHub committed 2026-04-14 00:22:16 +02:00
1 parent 15dce9de1c
commit 909dfd0a5c
2 files changed
+15 -1

No files matched your search

+4 -1
View File
@@ -110,7 +110,10 @@ impl<'a> Reporter<'a> {
}
/// Method that checks every commit for compliance
async fn check_commit(&self, commit: &CommitDetails) -> Result<ReviewSuccess, ReviewFailure> {
pub async fn check_commit(
&self,
commit: &CommitDetails,
) -> Result<ReviewSuccess, ReviewFailure> {
let Some(pr_number) = commit.pr_number() else {
return Err(ReviewFailure::NoPullRequestFound);
};
+11
View File
@@ -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,