The Git Repo Source is used to pull content from a remote git repository e.g. github.

yarn add @jpmorganchase/mosaic-source-git-repo

To successfully clone the git repo, the source definition must include credentials that have sufficient permissions to clone the repository.

We recommend storing a personal access token in an environment variable and using the environment variable in the source definition.

This keeps credentials out of code where they may be accidentally exposed to third parties.

PropertyDescriptionRequired
modulePathThe path to the installed module (@jpmorganchase/mosaic-source-git-repo)Yes
namespaceThe scope for this source.Yes
disabledWhen true, content from this source is not usedNo
options.credentialsCollection of URLS to make requestsYes
options.prefixDirThe root path used in the content URLYes
options.subfolderThe name of the folder within the cloned repo containing the docsYes
options.repoThe repo URLYes
options.branchThe branch or tag to cloneYes
options.extensionsCollection of file extensions that the source will look for inside the subfolderYes
options.remoteThe name of the git remote to use. Defaults to origin.Yes
Mosaic BETA

Coming soon