Skip to main content

Hooks

Index

Properties

optionalfetchHostedRepository

fetchHostedRepository?: (current: null | FetchResult, locator: Locator, opts: FetchOptions) => Promise<null | FetchResult>

Type declaration

    • Called when a Git repository is fetched. If the function returns null the repository will be cloned and packed; otherwise, it must returns a value compatible with what a fetcher would return.

      The main use case for this hook is to let you implement smarter cloning strategies depending on the hosting platform. For instance, GitHub supports downloading repository tarballs, which are more efficient than cloning the repository (even without its history).


      Parameters

      Returns Promise<null | FetchResult>