Skip to main content

Crate contributor_graphs

Crate contributor_graphs 

Source
Expand description

Build contributor timelines from a git or GitHub repository.

contributor-graphs is primarily a command-line tool, but the same engine is available as a library. The usual flow is analyze to turn a repository into Contributor rows plus RepoMeta, then one of the renderers in svg or html.

use contributor_graphs::{analyze, svg, Config};

let analysis = analyze("nf-core/rnaseq", &Config::default())?;
let rows: Vec<_> = analysis.contributors.iter().filter(|c| !c.bot).cloned().collect();
let opts = svg::SvgOptions {
    title: analysis.meta.name.clone(),
    ..Default::default()
};
std::fs::write("rnaseq.svg", svg::render_svg(&rows, &opts))?;

The lower-level modules (repo, identity, github) are public too, for callers who want to assemble a custom pipeline.

Re-exports§

pub use model::Contributor;
pub use model::RepoMeta;

Modules§

github
html
identity
model
repo
svg

Structs§

Analysis
The result of analyze: every contributor (bots included — filter on Contributor::bot if you don’t want them) and repository metadata.
Config
How to read history and resolve identities. Construct with Config::default() and override fields as needed.

Enums§

Sort
Row ordering for sort.

Functions§

analyze
Resolve a repository (local path, owner/repo slug, or git URL) into contributor data and metadata.
sort
Sort contributor rows in place.