For the complete documentation index, see llms.txt. This page is also available as Markdown.

catalogers/hooks

Configure cataloger hooks in lunar-config.yml — triggers like cron schedules or repository events that determine when catalogers run.

  • lunar-config.yml -> catalogers.<cataloger-index>.hook

  • lunar-config.yml -> catalogers.<cataloger-index>.hooks

  • lunar-cataloger.yml -> catalogers.<cataloger-index>.hook

  • lunar-cataloger.yml -> catalogers.<cataloger-index>.hooks

  • Type: object (singular hook) or array (plural hooks)

  • Form:

    hook:
      type: <hook-type>
      <options>

    or

    hooks:
      - type: <hook-type>
        <options>
      - type: <hook-type>
        <options>
      - ...

A cataloger hook defines a trigger point for when a cataloger should run. Catalogers can be triggered by various events such as code changes, or cron schedules. Both hook (singular) and hooks (plural array) are supported. Using hook is equivalent to using a single hook in the hooks field.

A hook has different configuration options depending on the type of event it is triggered by.

Hook types

cron

  • Form:

The cron type triggers the cataloger on a specified schedule. The schedule is defined using a cron expression.

repo

  • Form:

The repo type triggers the cataloger when a commit is made to a specified repository, named in the same URL format used elsewhere in the config. This cataloger type is most useful for centralized repositories that contain information about domains and/or components.

component-repo

  • Form:

The component-repo type triggers the cataloger when a commit is made to a component repository. This cataloger type is most useful when additional information about components is available in each of the respective repositories.

Although this cataloger type cannot be used to define new components, it can be used to augment the metadata (such as owner, description and tags) associated with existing components.

Set clone-code: true to have the component's repository checked out before the cataloger runs, so it reads repo-resident files (for example catalog-info.yaml, CODEOWNERS, or lunar.yml) directly from a working tree rather than fetching them through an API. The checkout is taken at the pushed commit for pushes to the repository's default branch — the authoritative state the cataloger augments component metadata from; pushes to other branches (and branch deletions) run the cataloger without a checkout. Without clone-code the cataloger receives only the component identifier and no checkout.

component-cron

  • Form:

The component-cron type triggers a cataloger run for each component, on a specified schedule. Although this cataloger type cannot be used to define new components, it can be used to augment the metadata (such as owner, description and tags) based on its component JSON.

Set clone-code: true to have each component's repository checked out at its current default-branch HEAD before the cataloger runs, so it reads repo-resident files (for example catalog-info.yaml, CODEOWNERS, or lunar.yml) directly from a working tree rather than fetching them through an API. A component whose repository isn't tracked yet, or has no commit ingested, runs without a checkout. Without clone-code the cataloger receives only the component identifier and no checkout.

Last updated