Skip to content

metadata.owner field in Ruby package.yml files not being respected #141

Closed

Description

@joshuaylee

Summary

The code_ownership documentation states that Ruby packages support ownership via both:

  1. Top-level owner field
  2. Nested metadata.owner field

However, the codeowner-rs documentation only mentions the top-level owner field. The code suggests metadata.owner is not currently supported for Ruby packages (though it is supported for JavaScript packages).

Expected Behavior

Ruby package.yml files should support ownership in either format:

  # Format 1: top-level owner
  owner: TeamName

  # Format 2: nested metadata.owner
  metadata:
    owner: TeamName

Current Behavior

Only Format 1 is supported (with code_ownership 2.0.0 and RustCodeOwners.version returning 0.3.0)

Questions

  1. Is the code_ownership documentation correct? Should codeowners-rs support metadata.owner for Ruby packages, to support the previous behavior of code_ownership?
  2. If yes, how should it handle conflicts when both fields are present (e.g., precedence rules or validation warnings)?
  3. If no, should the code_ownership docs be updated to remove mention of metadata.owner support?

I'd be happy to submit a PR in codeowner-rs or code_ownership depending on the direction.

Activity

  1. added
    bugSomething isn't working
    and removed
    triageA new issue that needs review by the core team
    on Nov 13, 2025
  2. martinemde commented on Nov 13, 2025

    @martinemde
    Contributor

    thanks for the submitting this @joshuaylee. This seems like a regression, but I'm not sure which is the best path.

    I do like keeping it simple with a single key, but I don't want to decide that on my own if it causes a lot of problems for other teams. Is there a reason to support the metadata key as well?

  3. oskarpearson commented on Nov 26, 2025

    @oskarpearson

    Mainly an "FYI" so that other people searching for the error message displayed find this ticket:

    When upgrading from code_ownership to version 2+, we got a message saying "Some files are missing ownership" - and then all ruby files were listed as not having an owner :)

    In our case, all our package.yml files had the owner in the JSON file as metadata.owner rather than using the top level key, so the Rust version of CodeOwnership excluded them.

    I personally don't mind much if it's "metadata.owner" or just "owner". Note that:

    Perhaps updating the README.md and adding something to the CHANGELOG would be sufficient?

  4. moved this from Triage to Done in Modularityon Sep 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingdocumentationImprovements or additions to documentation

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions