GitHub Org Cataloger
Sync repositories from GitHub organizations into your Lunar catalog. Automatically track visibility, topics, and metadata across all repos with configurable filtering.
github-org to your lunar-config.yml:uses: github://earthly/lunar-lib/catalogers/github-org@v1.0.5
What This Integration Syncs
This integration includes 1 cataloger that sync data from your systems.
repos
Syncs all repositories from a GitHub organization as components.
- Maps GitHub topics to Lunar tags with configurable prefix
- Supports filtering by visibility (public, private, internal)
- Supports include/exclude patterns for repository names
- Optionally includes archived repositories
0 2 * * *
How Catalogers Fit into Lunar
Lunar catalogers sync component metadata into your Lunar catalog from external systems or source code. They can run on a schedule or be triggered by code changes to keep your service registry up-to-date.
By automatically discovering components from GitHub organizations, service registries, or by detecting technology usage in source code, catalogers ensure your guardrails apply to all relevant services without manual configuration.
Learn How Lunar Works →Example Catalog Entry
This cataloger syncs component metadata into your Lunar catalog. Here's an example of a catalog entry it creates:
{
"components": {
"github.com/acme/payment-api": {
"owner": "platform-team@acme.com",
"tags": ["gh-backend", "gh-go", "gh-production", "github-visibility-private"],
"meta": {
"description": "Payment processing API service",
"visibility": "private",
"archived": "false"
}
},
"github.com/acme/frontend-app": {
"owner": "platform-team@acme.com",
"tags": ["gh-react", "gh-typescript", "github-visibility-public"],
"meta": {
"description": "Customer-facing web application",
"visibility": "public",
"archived": "false"
}
}
}
}
Configuration
Configure this cataloger in your lunar-config.yml.
Inputs
| Input | Required | Default | Description |
|---|---|---|---|
org_name
|
Required | — | GitHub organization name to sync (required) |
github_host
|
Optional |
github.com
|
GitHub hostname to catalog from. Use "github.com" (default) for GitHub.com, or a GitHub Enterprise Server hostname (e.g. "github.acme.com") to catalog from a self-hosted GHE instance. A full URL such as "https://github.acme.com" is also accepted — the scheme and any trailing path are stripped automatically. github.com authenticates with LUNAR_SECRET_GH_TOKEN; a GitHub Enterprise Server host authenticates with LUNAR_SECRET_GH_ENTERPRISE_TOKEN (falling back to LUNAR_SECRET_GH_TOKEN if the enterprise secret is unset). |
include_public
|
Optional |
true
|
Include public repositories |
include_private
|
Optional |
true
|
Include private repositories |
include_internal
|
Optional |
true
|
Include internal repositories (GitHub Enterprise) |
include_archived
|
Optional |
false
|
Include archived repositories |
include_repos
|
Required | — | Comma-separated list of glob patterns for repos to include. Empty means include all. Examples: "api-*,backend-*" |
exclude_repos
|
Required | — | Comma-separated list of glob patterns for repos to exclude. Examples: "sandbox-*,deprecated-*,test-*" |
tag_prefix
|
Optional |
gh-
|
Prefix for GitHub topics when converting to Lunar tags. Empty string disables the prefix. |
default_owner
|
Required | — | Default owner email for all components. Leave empty to not set owner. |
default_domain
|
Required | — | Default domain for all components. Leave empty to not set a domain. When set, the domain is stamped on every component's `.domain` field and also registered under `.domains` so the catalog passes the hub's domain-reference validation. A higher-precedence domain definition in lunar-config.yml still wins on merge. |
Documentation
View on GitHubGitHub Org Cataloger
Catalogs all repositories from a GitHub organization as Lunar components.
Overview
This cataloger syncs repositories from a GitHub organization into the Lunar catalog. It maps GitHub topics to Lunar tags (with a configurable prefix), supports filtering by visibility and repository name patterns, and can optionally stamp a default owner and domain on all components. It works against github.com as well as GitHub Enterprise Server (via the github_host input).
Synced Data
This cataloger writes to the following Catalog JSON paths:
| Path | Type | Description |
|---|---|---|
.components[*].owner |
string | Default owner (if default_owner is configured) |
.components[*].domain |
string | Default domain (if default_domain is configured) |
.components[*].tags[] |
array | GitHub topics with prefix (e.g., gh-backend) |
.components[*].meta.description |
string | Repository description |
.components[*].meta.visibility |
string | Repository visibility (public, private, internal) |
.components[*].meta.archived |
string | Whether the repository is archived ("true"/"false") |
.domains[*] |
object | Registers the default_domain (if configured) so the catalog passes the hub's domain-reference validation |
Example Catalog JSON output
{
"components": {
"github.com/acme/api": {
"owner": "platform-team@acme.com",
"tags": ["gh-backend", "gh-go", "gh-production"],
"meta": {
"description": "Main API service",
"visibility": "private",
"archived": "false"
}
},
"github.com/acme/frontend": {
"owner": "platform-team@acme.com",
"tags": ["gh-frontend", "gh-typescript"],
"meta": {
"description": "Web application",
"visibility": "private",
"archived": "false"
}
},
"github.com/acme/docs": {
"tags": ["gh-documentation"],
"meta": {
"description": "Public documentation site",
"visibility": "public",
"archived": "false"
}
}
}
}
Catalogers
This plugin provides the following catalogers:
| Cataloger | Description |
|---|---|
repos |
Syncs all repositories from the GitHub organization |
Hook Type
| Hook | Schedule | Description |
|---|---|---|
cron |
0 2 * * * |
Runs daily at 2am UTC |
Installation
Add to your lunar-config.yml:
catalogers:
- uses: github.com/earthly/lunar-lib/catalogers/github-org@v1.0.0
with:
org_name: "acme-corp"
Advanced Configuration
catalogers:
- uses: github.com/earthly/lunar-lib/catalogers/github-org@v1.0.0
with:
org_name: "acme-corp"
include_public: "true"
include_private: "true"
include_internal: "false"
include_archived: "false"
exclude_repos: "sandbox-*,deprecated-*,*-archive"
tag_prefix: "gh-"
default_owner: "platform-team@acme.com"
default_domain: "platform"
When default_domain is set, every discovered component gets that domain on its
.domain field, and the domain is registered under .domains so the catalog
passes the hub's domain-reference validation. A domain definition in
lunar-config.yml (or a later cataloger) takes precedence on merge, so you can
set a richer description/owner there and this cataloger won't clobber it.
GitHub Enterprise Server
To catalog from a self-hosted GitHub Enterprise Server instead of github.com,
set github_host to your GHE hostname:
catalogers:
- uses: github.com/earthly/lunar-lib/catalogers/github-org@v1.0.0
with:
org_name: "acme-corp"
github_host: "github.acme.com"
A full URL (e.g. https://github.acme.com) is also accepted — the scheme and
any trailing path are stripped automatically. Authentication for a GHE host uses
LUNAR_SECRET_GH_ENTERPRISE_TOKEN (routed to the GitHub CLI as
GH_ENTERPRISE_TOKEN), falling back to LUNAR_SECRET_GH_TOKEN if that secret is
not set — so a github.com and a GHE server can use distinct credentials. Component
IDs reflect the host, so a repo on GHE is keyed as github.acme.com/<org>/<repo>.
Include Only Specific Repos
catalogers:
- uses: github.com/earthly/lunar-lib/catalogers/github-org@v1.0.0
with:
org_name: "acme-corp"
include_repos: "api-*,backend-*,frontend-*"
Source System
This cataloger uses the GitHub CLI (gh) to query the GitHub API. It requires:
-
GitHub CLI installed and available in the container (included in custom image)
-
Authentication via
LUNAR_SECRET_GH_TOKEN(same as other GitHub collectors) with appropriate scopes:reposcope for private/internal repositoriesread:orgscope for public repositories only
For GitHub Enterprise Server (
github_hostother than github.com) the cataloger readsLUNAR_SECRET_GH_ENTERPRISE_TOKENand routes it to the GitHub CLI asGH_ENTERPRISE_TOKEN. If that secret is unset it falls back toLUNAR_SECRET_GH_TOKEN, so existing single-token setups keep working.
The cataloger makes API calls to list repositories and their topics. For large organizations, it fetches up to 10,000 repositories per visibility level.
Open Source
This cataloger is open source and available on GitHub. Contribute improvements, report issues, or fork it for your own use.
Ready to Automate Your Standards?
See how Lunar can turn your AGENTS.md, engineering wiki, compliance docs, or postmortem action items into automated guardrails with our 200+ built-in guardrails.