Skip to main content

query_sentiments

Function query_sentiments 

Source
pub fn query_sentiments(
    git: &dyn GitOps,
    query: &SentimentsQuery,
) -> Result<SentimentsOutput, GitError>
Expand description

Collect sentiments from annotations across the repository.

In v3, sentiments are migrated into wisdom entries (gotcha for worry/unease, unfinished_thread for uncertainty/doubt, insight for others). This function reconstructs sentiment-like entries from wisdom entries by inferring the feeling from the category.

  1. Determine which commits to examine
  2. For each commit, parse annotation via parse_annotation
  3. Map wisdom entries back to sentiment-like entries
  4. Return newest-first