Skip to content

Resolve MAINTAINERS relative to the repository instead of the current directory #595

Closed

Description

@LunaStev

tools/get_maintainer.py defines:

MAINTAINERS_FILE = "MAINTAINERS"

and checks that path relative to the process working directory.

This means the script works when launched from the repository root, but the same script fails with MAINTAINERS file not found when invoked through an absolute path or from another working directory.

The tool itself already has a stable location inside tools/, so locating the repository-level MAINTAINERS file does not need to depend on the caller's current directory.

Code evidence:

  • tools/get_maintainer.py
  • repository-level MAINTAINERS

Acceptance:

  • Resolve the repository root from __file__ or another deterministic source.
  • Locate MAINTAINERS independently of the process working directory.
  • Keep the existing root-directory invocation working.
  • Add a test that invokes the script with a different working directory.
  • Keep error reporting clear if the repository metadata is genuinely missing.

Activity

  1. added
    bug
    good first issue
    on Sep 12, 2026
  2. nightcityblade commented on Sep 12, 2026

    @nightcityblade
    Contributor

    Hi, I'd like to work on this. I'll submit a PR shortly.

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

    buggood first issue

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions