ninjecto.plugins.namespaces.git

Namespace plugin to access git context.

Functions

  • namespace_git(): Fetch information relative to the git context where the file input file is
ninjecto.plugins.namespaces.git.namespace_git(config, filepath)

Fetch information relative to the git context where the file input file is located.

Parameters
  • config (dict) – Plugin configuration, if any.
  • filepath (Path) – Path file been rendered.
Returns

A named tuple with information from git context.

Values available:

  • tag: tag for the current revision.
  • root: root of the git repository.
  • branch: current branch of the git repository.
  • revision: current revision of the git repository.
  • name: name of the author of the current revision.
  • email: email of the author of the current revision.
  • subject: commit message subject of current revision.
  • body: commit message body of current revision.
  • date: commit date in strict ISO 8601 format.

Return type

namedtuple