hermes.commands.harvest.git
Contents
hermes.commands.harvest.git
Module Contents
Classes
Stores contributor data information from Git history. |
|
Helper class to unify Git commit authors and committers. |
Functions
|
|
|
Merges the git authors and git committers |
|
Implementation of a harvester that provides autor data from Git. |
Attributes
- class hermes.commands.harvest.git.ContributorData(name: str | t.List[str], email: str | t.List[str], timestamp: str | t.List[str], role: str | t.List[str])
Stores contributor data information from Git history.
- update(name=None, email=None, timestamp=None, role=None)
Update the current contributor with the given data.
- Parameters
name – New name to assign (addtionally).
email – New email to assign (additionally).
timestamp – New timestamp to adapt time range.
- merge(other: ContributorData)
Merge another
ContributorData
instance into this one.All attributes will be merged yet kept unique if required.
- Parameters
other – The other instance that should contribute to this.
- class hermes.commands.harvest.git.NodeRegister(cls, *order, **mapping)
Helper class to unify Git commit authors and committers.
This class keeps track of all registered instances and merges two
ContributorData
instances if some attributes match.
- hermes.commands.harvest.git._merge_contributors(git_authors: NodeRegister, git_committers: NodeRegister) NodeRegister
Merges the git authors and git committers
NodeRegister
and assign the respective roles for each node.
- hermes.commands.harvest.git.harvest_git(click_ctx: click.Context, ctx: hermes.model.context.HermesHarvestContext)
Implementation of a harvester that provides autor data from Git.
- Parameters
click_ctx – Click context that this command was run inside (might be used to extract command line arguments).
ctx – The harvesting context that should contain the provided metadata.