Skip to content

Commit

Permalink
Add head_ref field to check output (#22)
Browse files Browse the repository at this point in the history
Signed-off-by: Sergio Castaño Arteaga <[email protected]>
  • Loading branch information
tegioz authored Sep 3, 2024
1 parent a1c40a5 commit b2d624c
Show file tree
Hide file tree
Showing 3 changed files with 91 additions and 1 deletion.
3 changes: 3 additions & 0 deletions dco2/src/dco/check/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,15 @@ mod tests;
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub(crate) struct CheckInput {
pub commits: Vec<Commit>,
pub head_ref: String,
}

/// Check output.
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, Template)]
#[template(path = "output.md")]
pub(crate) struct CheckOutput {
pub commits_with_errors: Vec<CommitCheckOutput>,
pub head_ref: String,
pub total_commits: usize,
}

Expand Down Expand Up @@ -61,6 +63,7 @@ pub(crate) enum CommitError {
pub(crate) fn check(input: &CheckInput) -> CheckOutput {
let mut output = CheckOutput {
commits_with_errors: Vec::new(),
head_ref: input.head_ref.clone(),
total_commits: input.commits.len(),
};

Expand Down
Loading

0 comments on commit b2d624c

Please sign in to comment.