Skip to content

[Code Quality] Fix dispatch-repository nested keys: rename event_type and allowed_repositories to kebab-case #46757

Description

@github-actions

Description

The dispatch-repository configuration block uses kebab-case for its top-level key (dispatch-repository) but snake_case for its nested keys (event_type, allowed_repositories). This is inconsistent with the rest of the frontmatter which uses kebab-case uniformly.

Flagged by the Schema Consistency Checker (discussion #46731).

Suggested Changes

  1. Determine the correct long-term naming policy: add kebab-case aliases (event-type, allowed-repositories) alongside the existing snake_case keys, OR rename and deprecate with a warning
  2. Update pkg/workflow/dispatch_repository.go to accept both forms (with deprecation warning for snake_case) or rename
  3. Update docs/src/content/docs/reference/frontmatter.md and frontmatter-full.md to document the canonical form
  4. Update schema in pkg/parser/schemas/main_workflow_schema.json to reflect the preferred keys
  5. Add/update tests to cover both forms during the transition

Files Affected

  • pkg/workflow/dispatch_repository.go
  • pkg/parser/schemas/main_workflow_schema.json
  • docs/src/content/docs/reference/frontmatter.md
  • docs/src/content/docs/reference/frontmatter-full.md

Success Criteria

  • dispatch-repository nested keys follow kebab-case convention OR a clear exception is documented
  • No breaking change for existing workflows using snake_case keys (backward-compatible aliases or deprecation warnings)
  • Schema examples reflect the canonical form
  • Docs are updated

Source

Extracted from [Schema Consistency] Schema Consistency Check - 2026-07-20

Priority

Medium — naming inconsistency creates authoring confusion; low-risk to fix with aliases

🔍 Task mining by Discussion Task Miner - Code Quality Improvement Agent · 44.8 AIC · ⌖ 7.87 AIC · ⊞ 7K ·

  • expires on Jul 20, 2026, 11:50 PM UTC-08:00

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions