Skip to content

Migrate OWNERS-file dispatch authorization from bash/yq to a Go implementation #6072

Description

@ralphbean

What happens

PR #6051 (closing #6042) added opt-in Prow OWNERS-file authorization to has_repo_permission() in .github/workflows/reusable-dispatch.yml. The logic is implemented entirely as inline bash and yq calls embedded in the workflow YAML:

  • Authorization decisions for OWNERS approvers/reviewers happen via string-interpolated yq queries inside a shell function.
  • Errors (malformed YAML, missing files, yq failures) silently fall through to the GitHub collaborator-API fallback, with no structured error handling.
  • The logic can't be unit-tested outside a live GitHub Actions run — it's only exercised end-to-end via godog e2e scenarios that parse real workflow logs.
  • authorization.owners_file is read directly from .fullsend/config.yaml via yq, bypassing the existing internal/config.LoadConfig overlay → base → code-defaults merge chain. Setting authorization.owners_file: true in a shared .fullsend/config.base.yaml preset has no effect — it only works when set in each repo's overlay config.yaml directly.

What should happen

The OWNERS-file (and, more broadly, any future non-GitHub-native) authorization logic should live in a Go package with proper types, error handling, and unit test coverage, invoked by the workflow through a CLI subcommand rather than reimplemented in bash. Whatever replaces the current bash implementation should read config through the existing internal/config.LoadConfig merge chain, so authorization.owners_file (and any future authorization config) correctly honors config.base.yaml presets.

Context

Metadata

Metadata

Assignees

No one assigned

    Labels

    component/dispatchWorkflow dispatch and triggersfeatureFeature-category issue awaiting human prioritizationpriority/mediumNormal priority, plan for next cycletech-debttriagedTriaged but awaiting human prioritizationtype/featureNew capability request

    Type

    No type

    Projects

    Status
    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions