pub struct Commit {Show 15 fields
pub id: i64,
pub sha: String,
pub author_id: Option<i64>,
pub author_name: String,
pub author_email: String,
pub timestamp: DateTime<Utc>,
pub message: String,
pub repository: String,
pub files_changed: u32,
pub insertions: u32,
pub deletions: u32,
pub classification_id: Option<i64>,
pub confidence: Option<f64>,
pub is_merge: bool,
pub ticketed: bool,
}Expand description
A single commit observed in a repository.
Why: rows in the commits SQLite table need a typed in-memory
counterpart that both extractors and aggregators can share.
What: maps 1:1 onto the v1 commits schema. Serialize/Deserialize
derives let report formatters emit it as JSON without a DTO layer.
Test: covered indirectly by every test that inserts into the
commits table (see core::tests::database_opens_with_wal_and_migrations_apply).
Fields§
§id: i64Primary key (database-assigned).
sha: StringFull git OID (hex).
Foreign key into Author.
Author display name as recorded in the commit.
Author email as recorded in the commit.
timestamp: DateTime<Utc>Author timestamp (UTC).
message: StringCommit message body (raw).
repository: StringRepository identifier (path or canonical name).
files_changed: u32Number of files changed.
insertions: u32Lines added.
deletions: u32Lines deleted.
classification_id: Option<i64>Foreign key into Classification, if classified.
confidence: Option<f64>Confidence assigned by the classifier (0.0–1.0).
is_merge: boolTrue for merge commits (parents > 1).
ticketed: boolTrue if the commit message references a known ticket system
(JIRA/Linear-style PROJ-123, GitHub fixes #123, or bare #123).
Computed at extraction time by crate::collect::ticket::is_ticketed
and persisted on the commits row.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Commit
impl<'de> Deserialize<'de> for Commit
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for Commit
impl RefUnwindSafe for Commit
impl Send for Commit
impl Sync for Commit
impl Unpin for Commit
impl UnsafeUnpin for Commit
impl UnwindSafe for Commit
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more