Skip to main content

Sync Ownership

Sync homepage, bugs, author, contributors, funding, and repository fields in workspace package.json files.

Summary

The sync-ownership recipe ensures that ownership-related fields in each workspace's package.json match the values defined in nova.config.json.

For distributable workspaces, each field can be individually enabled via recipe settings.

Behavior

For each eligible workspace, the recipe inspects ownership fields and applies the following rules. Every field below is removed if the workspace policy is not distributable. See Workspace Rules for how tags are determined.

For distributable workspaces with the respective setting enabled, the value is synced from nova.config.json. If the source value is not defined, the field is removed.

  • homepage (Conditional) — Synced from urls.homepage.
  • bugs (Conditional) — Synced as { "email": emails.bugs, "url": urls.bugs }.
  • author (Conditional) — Synced from the first entity with the author role as { "name", "email", "url" }.
  • contributors (Conditional) — Synced from all entities with the contributor role as an array of { "name", "email", "url" }.
  • funding (Conditional) — Synced from urls.fundSources.
  • repository (Conditional) — Synced as { "type": "git", "url": urls.repository }. A directory property is included when the workspace is not at the project root, using the relative path from the project root.

Settings

Settings are configured per workspace in nova.config.json under the recipes key:

SettingTypeDescription
homepagebooleanSync the homepage field (distributable workspaces only).
bugsbooleanSync the bugs field (distributable workspaces only).
authorbooleanSync the author field (distributable workspaces only).
contributorsbooleanSync the contributors field (distributable workspaces only).
fundingbooleanSync the funding field (distributable workspaces only).
repositorybooleanSync the repository field (distributable workspaces only).

Usage

Options

FlagDescription
-d, --dry-runPreview changes without modifying files.
-r, --replace-fileOverwrite the original file instead of creating a .nova-backup copy.