Skip to content

Set up tiered CODEOWNERS: enterprise-titans as backstop, contractor teams on app/docs - #66

Draft
macdiesel with Copilot wants to merge 2 commits into
masterfrom
copilot/setup-codeowners-file
Draft

macdiesel with Copilot wants to merge 2 commits into
masterfrom
copilot/setup-codeowners-file

Conversation

Copilot AI commented Apr 1, 2026 •

Copy link
Copy Markdown
Contributor

Replaces the flat all-teams-own-everything CODEOWNERS rule with a tiered model that makes @edx/enterprise-titans a required reviewer on anything not explicitly carved out, while giving @edx/enterprise-sunrise and @edx/enterprise-lakshy co-ownership over application code and low-risk docs/markdown.

Ownership structure

Pattern Owners
* (catch-all) @edx/enterprise-titans only
/enterprise_catalog/ all three teams
/docs/, *.md, *.rst all three teams

Notes

  • No top-level catalog/ or tests/ directories exist in this repo — patterns limited to what's actually present
  • Removed @edx/enterprise-markhors (not in scope for this model)
  • CODEOWNERS patterns ordered least → most specific so more specific rules override the catch-all, per GitHub's evaluation order
Original prompt

Goal

Set up a .github/CODEOWNERS file for edx/enterprise-catalog that establishes tiered code ownership for contractor teams, using @edx/enterprise-titans as the internal backstop and giving contractor teams (@edx/enterprise-sunrise, @edx/enterprise-lakshy) ownership over application code.

Context

We are onboarding multiple external contractor teams and want to gradually hand over merge ownership to them. All three teams already exist in the edx GitHub org:

  • @edx/enterprise-titans — internal team, backstop owners for everything
  • @edx/enterprise-sunrise — contractor team 1
  • @edx/enterprise-lakshy — contractor team 2

The repo's default branch is master.

What to implement

Create .github/CODEOWNERS with the following structure:

  1. * (catch-all) → @edx/enterprise-titans only. This ensures titans are always a required reviewer for anything not explicitly matched below, and serve as the safety net.

  2. Application code directories (the Django app code) → @edx/enterprise-titans @edx/enterprise-sunrise @edx/enterprise-lakshy. Both contractor teams should own and be able to review/merge application code.

    • The main application code lives in the catalog/ directory (the primary Django app package for this repo).
    • Also include enterprise_catalog/ if it exists (it may contain settings/wsgi/urls).
  3. Docs, tests, and markdown → @edx/enterprise-titans @edx/enterprise-sunrise @edx/enterprise-lakshy. Lower-risk areas all contractor teams can own.

    • /docs/
    • /tests/
    • *.md
    • *.rst

Acceptance criteria

  • .github/CODEOWNERS file is created (it does not currently exist in this repo)
  • The catch-all * rule points only to @edx/enterprise-titans
  • Application code directories are co-owned by all three teams
  • File follows valid CODEOWNERS syntax (patterns listed from least to most specific — more specific rules override less specific ones, so the catch-all * must come first)
  • The PR includes a brief comment in the CODEOWNERS file explaining the intent of the tiered ownership model

Important notes

  • Before writing the file, verify the actual directory structure of the repo to confirm the correct paths for the Django app code (look for catalog/, enterprise_catalog/, or similar top-level Python package directories)
  • Do NOT include paths that don't exist in the repo
  • The repo uses master as its default branch

The following is the prior conversation context from the user's chat exploration (may be truncated):

User: I"ve been working on this plan with chat GPT. What do you think?

Below is a Claude-ready implementation plan you can paste into Claude (or use as a task brief). It includes: team definitions, repo list + URLs, the policy intent, the exact CODEOWNERS templates to create, and the branch protection / permissions checklist.


Implementation Plan: Phased Merge Autonomy for Enterprise Repos (Claude Task Brief)

Date: 2026-04-01
Goal: Gradually delegate PR review + merge autonomy to contractor teams while keeping a “master” team with full approval/merge authority across all enterprise repos.

1) Organizations in scope

  • GitHub org: openedx
  • GitHub org: edx

2) Teams (existing)

These teams already exist and must be used as the starting point:

2.1 Master / can do everything

  • Team: enterprise-titans
  • Intended behavior:
    • Can approve and merge anything in all listed repos
    • Acts as ultimate override / backstop

2.2 Newly onboard teams (can open PRs)

  • Team: enterprise-sunrise
  • Team: enterprise-lakshy

2.3 Ownership by domain

  • enterprise-lakshy owns:
    • Reporting
    • Admin portal
  • enterprise-sunrise owns:
    • Integrations
    • Checkout

IMPORTANT DECISION REQUIRED DURING IMPLEMENTATION
If you need “trusted engineers only” to be able to satisfy CODEOWNERS approvals within Sunrise/Lakshy domains, create two new sub-teams and use them in CODEOWNERS instead of the full contractor teams:

  • enterprise-lakshy-maintainers (trusted Lakshy engineers only)
  • enterprise-sunrise-maintainers (trusted Sunrise engineers only)

If these teams are not created, then any member of enterprise-sunrise/enterprise-lakshy (with sufficient repo permission) could satisfy CODEOWNERS review for their owned areas.


3) Repositories in scope (high priority for CODEOWNERS)

Microservices / Backend Services

Repo URL Notes
openedx/enterprise-catalog https://github.com/openedx/enterprise-catalog Core service
openedx/edx-enterprise https://github.com/openedx/edx-enterprise LMS plugin
openedx/enterprise-access https://github.com/openedx/enterprise-access Access policies
openedx/enterprise-subsidy https://github.com/openedx/enterprise-subsidy Subsidy transactions
openedx/enterprise-integrated-channels https://github.com/openedx/enterprise-integrated-channels Sunrise-owned integrations...

This pull request was created from Copilot chat.

…actor team co-ownership

Agent-Logs-Url: https://github.com/edx/enterprise-catalog/sessions/e8184494-7d99-4414-9188-82f19f50511c

Co-authored-by: macdiesel <67862+macdiesel@users.noreply.github.com>
Copilot AI changed the title [WIP] Add CODEOWNERS file for tiered code ownership Set up tiered CODEOWNERS: enterprise-titans as backstop, contractor teams on app/docs Apr 1, 2026
Copilot AI requested a review from macdiesel April 1, 2026 14:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants