package statocaml_profile

  1. Overview
  2. Docs

Module type T.SSource

module Subs : Subsys.S
type dated = {
  1. mutable commits : S.Sset.t;
  2. mutable lines_added : int;
  3. mutable lines_deleted : int;
  4. mutable issues : S.Iset.t;
  5. mutable issues_created : S.Iset.t;
  6. mutable issue_comments : S.Iset.t;
  7. mutable issues_reviewed : S.Iset.t;
  8. mutable prs : S.Iset.t;
  9. mutable prs_created : S.Iset.t;
  10. mutable prs_created_merged : S.Iset.t;
  11. mutable pr_author_commits : S.Sset.t;
  12. mutable lines_added_in_prs_as_author : int list;
  13. mutable lines_deleted_in_prs_as_author : int list;
  14. mutable avg_lines_added_by_pr_as_author : float option;
  15. mutable avg_lines_deleted_by_pr_as_author : float option;
  16. mutable pr_comments : S.Iset.t;
  17. mutable pr_review_comments : S.Iset.t;
  18. mutable pr_review_commits : S.Sset.t;
  19. mutable lines_added_in_prs_as_reviewer : int list;
  20. mutable lines_deleted_in_prs_as_reviewer : int list;
  21. mutable avg_lines_added_by_pr_as_reviewer : float option;
  22. mutable avg_lines_deleted_by_pr_as_reviewer : float option;
  23. mutable prs_reviewed : S.Iset.t;
  24. mutable prs_reviewed_from_changelog : S.Iset.t;
  25. mutable subsys_issues : float Subs.Map.t;
  26. mutable subsys_commits : float Subs.Map.t;
  27. mutable subsys_committed_files : float Subs.Map.t;
  28. mutable subsys_committed_lines : float Subs.Map.t;
  29. mutable reviewer_of_shared : float S.Imap.t;
  30. mutable reviewed_by_shared : float S.Imap.t;
  31. mutable reviewer_of : float S.Imap.t;
  32. mutable reviewed_by : float S.Imap.t;
  33. mutable as_author : S.Iset.t;
  34. mutable as_analyst : S.Iset.t;
  35. mutable as_reviewer : S.Iset.t;
  36. mutable as_reporter : S.Iset.t;
  37. mutable as_suggester : S.Iset.t;
  38. mutable as_other : S.Iset.t;
  39. mutable activity_score : float;
}
val new_dated : unit -> dated
val merge_dated : src:dated -> dst:dated -> unit
val pp_dated : Format.formatter -> dated -> unit
type profile_kind =
  1. | Person
  2. | Group of (profile * group_membership_periods) S.Imap.t
and profile = {
  1. id : user_id;
  2. kind : profile_kind;
  3. gh_user : GH.Types.full_user option;
  4. name : string;
  5. mutable dateds : dated Period.Map.t;
}
and profiles = profile S.Imap.t
val get_dated : profile -> Period.t -> dated
val opt_dated : profile -> Period.t -> dated option
val dateds_by_year : profile -> dated S.Imap.t
type finger
val finger_find : ?email:string -> ?login:string -> ?name:string -> ?commit:GH.Types.commit -> ?id:user_id -> finger -> profile option
type predefined_profile = {
  1. names : string list;
  2. gh_login : string;
  3. emails : string list;
}
val predefined_profiles_from_file : string -> predefined_profile list Lwt.t
val groups_from_file : string -> string group S.Smap.t Lwt.t
type pr = {
  1. issue : GH.Types.issue;
  2. merge_date : Ptime.t option;
  3. pr : GH.Types.pull_request;
  4. authors : S.Iset.t;
  5. reviewers : S.Iset.t;
  6. author_commits : S.Sset.t;
  7. review_commits : S.Sset.t;
  8. comments : GH.Types.comment S.Imap.t;
  9. review_comments : GH.Types.review_comment S.Imap.t;
  10. merger : user_id option;
}
type gstats = {
  1. mutable g_issues : GH.Types.issue S.Imap.t;
  2. mutable g_prs : pr S.Imap.t;
  3. mutable g_commits : GH.Types.commit S.Smap.t;
  4. mutable g_committers : (user_id * int) list;
  5. mutable g_pr_commits : GH.Types.commit S.Smap.t;
  6. mutable g_pr_committers : (user_id * int) list;
  7. mutable g_issue_comments : int;
  8. mutable g_issue_commenters : (user_id * int) list;
  9. mutable g_issue_participants : (user_id * int) list;
  10. mutable g_issue_creators : (user_id * int) list;
  11. mutable g_issue_reviewers : (user_id * int) list;
  12. mutable g_pr_comments : int;
  13. mutable g_pr_commenters : (user_id * int) list;
  14. mutable g_pr_participants : (user_id * int) list;
  15. mutable g_pr_creators : (user_id * int) list;
  16. mutable g_pr_reviewers : (user_id * int) list;
  17. mutable g_pr_reviewers_from_changelog : (user_id * int) list;
  18. mutable g_prs_of_subsys : S.Iset.t Subs.Map.t;
  19. mutable g_subsys_commits : float Subs.Map.t;
  20. mutable g_active_contributors : (user_id * float) list;
}
val gstats : unit -> gstats
type max = {
  1. mutable max_committer : int * user_id;
  2. mutable max_issue_commenter : int * user_id;
  3. mutable max_issue_reviewer : int * user_id;
  4. mutable max_issue_creator : int * user_id;
  5. mutable max_pr_commenter : int * user_id;
  6. mutable max_pr_creator : int * user_id;
  7. mutable max_pr_reviewer : int * user_id;
  8. mutable max_pr_reviewer_from_changelog : int * user_id;
  9. mutable max_subsys_commits : (int * user_id) Subs.Map.t;
}
type t = {
  1. repo_name : string;
  2. finger : finger;
  3. mutable stats : gstats Period.Map.t;
  4. mutable max : max Period.Map.t;
  5. orig_issues : GH.Types.issue S.Imap.t;
  6. orig_commits : GH.Types.commit S.Smap.t;
  7. get_gh_user : string -> GH.Types.full_user option;
  8. orig_changelog : Changelog.t option;
  9. orig_events : S.Types.event list;
  10. has_changelog : bool;
}
val create : repo_name:string -> ?finger:(finger * S.Iset.t) -> ?predef:predefined_profile list -> ?events:S.Types.event list -> ?changelog:Changelog.t -> (string -> GH.Types.full_user option) -> GH.Types.issue S.Imap.t -> GH.Types.commit S.Smap.t -> t Lwt.t
val dup : t -> t
val profiles : t -> profiles
val profile : t -> user_id -> profile
val profile_opt : t -> user_id -> profile option
val with_profiles : t -> profiles -> t
val group_profiles : thresholds -> t -> profile S.Imap.t Period.Map.t
val make_groups : ?events:S.Types.event list -> t -> GH.Types.full_user group S.Smap.t -> t Lwt.t
val dot_review : title:string -> ?profile_link:(profile -> string) -> file:string -> ?output_type:string -> directed:bool -> profile S.Imap.t -> unit Lwt.t
val issue_creation_year : GH.Types.issue -> int