Module

PuduLangDocgen.Repository

View source

Source repository identity and file history from their raw forms

Functions

Name Description
normalize A remote address as a browsable HTTPS address without credentials or `.git`. `git@host:owner/repo.git` and `ssh://git@host/owner/repo` both become `https://host/owner/repo`.
fromEnvironment The repository address and branch environment variables name, when they name them. `DOCGEN_SOURCE_REPOSITORY_URL` and `DOCGEN_SOURCE_BRANCH_NAME` override every service.
history The latest change date of each file from log text that lists `@YYYY-MM-DD` lines followed by the files each change touched, newest first.

normalize

fn normalize(remote: Str) -> Str

A remote address as a browsable HTTPS address without credentials or .git. git@host:owner/repo.git and ssh://git@host/owner/repo both become https://host/owner/repo.

Parameters

remote
Str

Returns

Str

View source

fromEnvironment

fn fromEnvironment(variables: &Array[(Str, Str)]) -> (Str, Str)

The repository address and branch environment variables name, when they name them. DOCGEN_SOURCE_REPOSITORY_URL and DOCGEN_SOURCE_BRANCH_NAME override every service.

Parameters

variables
&Array[(Str, Str)]

Returns

(Str, Str)

View source

history

fn history(log: Str) -> Map[Str, Str]

The latest change date of each file from log text that lists @YYYY-MM-DD lines followed by the files each change touched, newest first.

Parameters

log
Str

Returns

Map[Str, Str]

View source