Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VACMS-14342: Set up CODEOWNERS #15581

Merged
merged 10 commits into from
Nov 1, 2023
127 changes: 115 additions & 12 deletions .github/CODEOWNERS
davidmpickett marked this conversation as resolved.
Show resolved Hide resolved
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1,23 +1,126 @@

# Lines starting with '#' are comments.
# Each line is a file pattern followed by one or more owners.

# More details are here: https://help.github.com/articles/about-codeowners/

# The '*' pattern is global owners.

# Order is important. The last matching pattern has the most precedence.
# The folders are ordered as follows:

# In each subsection folders are ordered first by depth, then alphabetically.
# This should make it easy to add new rules without breaking existing ones.
# More details are here: https://help.github.com/articles/about-codeowners/

# CMS teams: See https://github.com/orgs/department-of-veterans-affairs/teams?query=cms for full list
# Also see https://github.com/department-of-veterans-affairs/va.gov-cms/issues/15563 re: cleanup
#
# @department-of-veterans-affairs/cms-infrastructure
# @department-of-veterans-affairs/facilities-cms
# @department-of-veterans-affairs/public-websites-cms
# @department-of-veterans-affairs/vfs-cms-team
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Noting: this team is primarily administrative, and used to govern access to the va.gov-cms repo, mainly so ppl can access the sprint board and make tickets in here, but it includes all kinds of random people (PMs, DMs, Researchers, etc). I know this is a code comment is that worth adding, so no one tries to make this group a codeowner of anything? I could go either way. 🤷‍♀️

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good question. I thought it might be a good fallback, but perhaps it's not. I could also just use all of the existing teams if there's no good reason for a specific one to get requests.

# @department-of-veterans-affairs/vfs-cms-team-core
# @department-of-veterans-affairs/vfs-cms-team-product
# @department-of-veterans-affairs/vfs-cms-team-infrastructure

# Global rule:
# @department-of-veterans-affairs/vfs-cms-team
# By default, ownership reverts to platform-cms-drupal-engineers
* @department-of-veterans-affairs/platform-cms-drupal-engineers

# Local/Codespaces/Tugboat/GitHub stuff belongs to DevOps...
/.ddev/ @department-of-veterans-affairs/platform-cms-devops-engineers
/.devcontainer/ @department-of-veterans-affairs/platform-cms-devops-engineers
/.dumps/ @department-of-veterans-affairs/platform-cms-devops-engineers
/.github/ @department-of-veterans-affairs/platform-cms-devops-engineers
/.storybook/ @department-of-veterans-affairs/platform-cms-ux @department-of-veterans-affairs/platform-cms-accessibility
/.tugboat/ @department-of-veterans-affairs/platform-cms-devops-engineers
/.vscode/ # @department-of-veterans-affairs/platform-cms-drupal-engineers
/bin/ @department-of-veterans-affairs/platform-cms-devops-engineers

# Config belongs to everyone, because I haven't figured out a way for this not to be a pain in the butt.
/config/ @department-of-veterans-affairs/vfs-cms-team
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Related to my comment above. 😬 Do we need a "platform-cms-contributors" team or something that is only engineers? That is annoying and probably wrong, if I'm thinking about how new Drupal contributor teams will get onboarded (would mean adding them to both vfs-cms-team for access, as well as the code contrib team, for PR review purposes.).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Whatever's easiest. If everyone gets vfs-cms-team, then that's fine IMHO and probably for most everyone. I'm not worried about people maliciously editing anything, and the lower the friction, the better.

/config/sync/ # @department-of-veterans-affairs/vfs-cms-team
/config/sync/*jsonapi* @department-of-veterans-affairs/accelerated-publishing
ndouglas marked this conversation as resolved.
Show resolved Hide resolved
/config/sync/*vamc* @department-of-veterans-affairs/facilities-cms
/config/sync/*vba* @department-of-veterans-affairs/facilities-cms
/config/sync/*vet_center* @department-of-veterans-affairs/facilities-cms
/docroot/ # @department-of-veterans-affairs/platform-cms-drupal-engineers
/docroot/cypress/ @department-of-veterans-affairs/platform-cms-qa
/docroot/design-system/ @department-of-veterans-affairs/platform-cms-ux
/docroot/modules/ # @department-of-veterans-affairs/platform-cms-drupal-engineers

# Custom modules should be owned by the teams with primary responsibility for maintaining them.
/docroot/modules/custom/va_gov_api @department-of-veterans-affairs/accelerated-publishing
/docroot/modules/custom/va_gov_backend # @department-of-veterans-affairs/platform-cms-drupal-engineers
/docroot/modules/custom/va_gov_banner # @department-of-veterans-affairs/platform-cms-drupal-engineers
/docroot/modules/custom/va_gov_benefits @department-of-veterans-affairs/public-websites-cms
/docroot/modules/custom/va_gov_block_types # @department-of-veterans-affairs/platform-cms-drupal-engineers
/docroot/modules/custom/va_gov_build_trigger # @department-of-veterans-affairs/platform-cms-drupal-engineers
/docroot/modules/custom/va_gov_bulk # @department-of-veterans-affairs/platform-cms-drupal-engineers
/docroot/modules/custom/va_gov_clone # @department-of-veterans-affairs/platform-cms-drupal-engineers
/docroot/modules/custom/va_gov_clp # @department-of-veterans-affairs/platform-cms-drupal-engineers
/docroot/modules/custom/va_gov_consumers @department-of-veterans-affairs/facilities-cms
ndouglas marked this conversation as resolved.
Show resolved Hide resolved
/docroot/modules/custom/va_gov_content_release # @department-of-veterans-affairs/platform-cms-drupal-engineers
/docroot/modules/custom/va_gov_content_types # @department-of-veterans-affairs/platform-cms-drupal-engineers
ndouglas marked this conversation as resolved.
Show resolved Hide resolved
/docroot/modules/custom/va_gov_dashboards # @department-of-veterans-affairs/platform-cms-drupal-engineers
ndouglas marked this conversation as resolved.
Show resolved Hide resolved
/docroot/modules/custom/va_gov_db # @department-of-veterans-affairs/platform-cms-drupal-engineers
/docroot/modules/custom/va_gov_entity_browser @department-of-veterans-affairs/public-websites-cms
ndouglas marked this conversation as resolved.
Show resolved Hide resolved
/docroot/modules/custom/va_gov_environment # @department-of-veterans-affairs/platform-cms-drupal-engineers
/docroot/modules/custom/va_gov_events @department-of-veterans-affairs/public-websites-cms
/docroot/modules/custom/va_gov_facilities @department-of-veterans-affairs/facilities-cms
/docroot/modules/custom/va_gov_flags # @department-of-veterans-affairs/platform-cms-drupal-engineers
ndouglas marked this conversation as resolved.
Show resolved Hide resolved
/docroot/modules/custom/va_gov_git # @department-of-veterans-affairs/platform-cms-drupal-engineers
/docroot/modules/custom/va_gov_github # @department-of-veterans-affairs/platform-cms-drupal-engineers
/docroot/modules/custom/va_gov_govdelivery @department-of-veterans-affairs/facilities-cms
/docroot/modules/custom/va_gov_graphql # @department-of-veterans-affairs/platform-cms-drupal-engineers
/docroot/modules/custom/va_gov_header_footer @department-of-veterans-affairs/public-websites-cms
/docroot/modules/custom/va_gov_help_center # @department-of-veterans-affairs/platform-cms-drupal-engineers
/docroot/modules/custom/va_gov_home @department-of-veterans-affairs/public-websites-cms
/docroot/modules/custom/va_gov_links # @department-of-veterans-affairs/platform-cms-drupal-engineers
/docroot/modules/custom/va_gov_live_field_migration # @department-of-veterans-affairs/platform-cms-drupal-engineers
/docroot/modules/custom/va_gov_login # @department-of-veterans-affairs/platform-cms-drupal-engineers
/docroot/modules/custom/va_gov_lovell @department-of-veterans-affairs/facilities-cms
/docroot/modules/custom/va_gov_magichead @department-of-veterans-affairs/public-websites-cms
/docroot/modules/custom/va_gov_media # @department-of-veterans-affairs/platform-cms-drupal-engineers
/docroot/modules/custom/va_gov_menu_access # @department-of-veterans-affairs/platform-cms-drupal-engineers
/docroot/modules/custom/va_gov_menus # @department-of-veterans-affairs/platform-cms-drupal-engineers
/docroot/modules/custom/va_gov_migrate @department-of-veterans-affairs/facilities-cms
ndouglas marked this conversation as resolved.
Show resolved Hide resolved
ndouglas marked this conversation as resolved.
Show resolved Hide resolved
/docroot/modules/custom/va_gov_multilingual # @department-of-veterans-affairs/platform-cms-drupal-engineers
/docroot/modules/custom/va_gov_notifications # @department-of-veterans-affairs/platform-cms-drupal-engineers
ndouglas marked this conversation as resolved.
Show resolved Hide resolved
/docroot/modules/custom/va_gov_post_api @department-of-veterans-affairs/facilities-cms
/docroot/modules/custom/va_gov_preview # @department-of-veterans-affairs/platform-cms-drupal-engineers
/docroot/modules/custom/va_gov_profile @department-of-veterans-affairs/facilities-cms
/docroot/modules/custom/va_gov_resources_and_support @department-of-veterans-affairs/public-websites-cms
/docroot/modules/custom/va_gov_user # @department-of-veterans-affairs/platform-cms-drupal-engineers
ndouglas marked this conversation as resolved.
Show resolved Hide resolved
/docroot/modules/custom/va_gov_vamc @department-of-veterans-affairs/facilities-cms
/docroot/modules/custom/va_gov_vba_facility @department-of-veterans-affairs/facilities-cms
/docroot/modules/custom/va_gov_vet_center @department-of-veterans-affairs/facilities-cms
/docroot/modules/custom/va_gov_workflow # @department-of-veterans-affairs/platform-cms-drupal-engineers
ndouglas marked this conversation as resolved.
Show resolved Hide resolved
/docroot/modules/custom/va_gov_workflow_assignments # @department-of-veterans-affairs/platform-cms-drupal-engineers

/docroot/profiles/ @department-of-veterans-affairs/platform-cms-qa
/docroot/scripts/ @department-of-veterans-affairs/platform-cms-devops-engineers
/docroot/simplesaml/ @department-of-veterans-affairs/platform-cms-devops-engineers
/docroot/sites/ @department-of-veterans-affairs/platform-cms-devops-engineers @department-of-veterans-affairs/platform-cms-drupal-engineers
/docroot/themes/ @department-of-veterans-affairs/platform-cms-ux @department-of-veterans-affairs/platform-cms-accessibility
/drush/ # @department-of-veterans-affairs/platform-cms-drupal-engineers
/hooks/ @department-of-veterans-affairs/platform-cms-devops-engineers
/patches/ # @department-of-veterans-affairs/platform-cms-drupal-engineers
/scripts/ @department-of-veterans-affairs/platform-cms-devops-engineers
/tests/ @department-of-veterans-affairs/platform-cms-qa
/tests/cypress/ # @department-of-veterans-affairs/platform-cms-qa
/tests/phpunit/ # @department-of-veterans-affairs/platform-cms-qa
/tests/scripts/ @department-of-veterans-affairs/platform-cms-qa @department-of-veterans-affairs/platform-cms-devops-engineers
.env.example @department-of-veterans-affairs/platform-cms-devops-engineers
.gitattributes @department-of-veterans-affairs/platform-cms-devops-engineers
.gitignore @department-of-veterans-affairs/platform-cms-devops-engineers
.web @department-of-veterans-affairs/platform-cms-devops-engineers
composer.json # @department-of-veterans-affairs/platform-cms-drupal-engineers
composer.lock # @department-of-veterans-affairs/platform-cms-drupal-engineers
cypress.config.js @department-of-veterans-affairs/platform-cms-qa
Jenkinsfile.cd @department-of-veterans-affairs/platform-cms-devops-engineers
multi-reporter-config.json @department-of-veterans-affairs/platform-cms-qa
package-lock.json # @department-of-veterans-affairs/platform-cms-drupal-engineers
package.json # @department-of-veterans-affairs/platform-cms-drupal-engineers
phpcs.xml.dist @department-of-veterans-affairs/platform-cms-qa
phploc.phar @department-of-veterans-affairs/platform-cms-qa
phpstan_bootstrap.php @department-of-veterans-affairs/platform-cms-qa
phpstan-baseline.neon @department-of-veterans-affairs/platform-cms-qa
phpstan.neon @department-of-veterans-affairs/platform-cms-qa
phpunit.xml @department-of-veterans-affairs/platform-cms-qa
LICENSE.md @department-of-veterans-affairs/platform-cms
README.md @department-of-veterans-affairs/platform-cms
SECURITY.md @department-of-veterans-affairs/platform-cms-qa
tasks-periodic.yml @department-of-veterans-affairs/platform-cms-devops-engineers
tests.yml @department-of-veterans-affairs/platform-cms-qa
tugboat.yml @department-of-veterans-affairs/platform-cms-devops-engineers
29 changes: 29 additions & 0 deletions READMES/codeowners.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Code Ownership and CODEOWNERS

Code ownership is the practice of designating specific individuals or teams as the primary maintainers or "owners" of certain parts of a codebase.

Identified benefits include the following:

- **Documented Responsibility**: When a specific part of the code has a designated owner, it is clear who is responsible for its maintenance, updates, and quality.

- **Greater Expertise**: Over time, code owners become experts in their designated areas, which can lead to faster debugging, better code quality, and more informed decisions about that part of the code. It also reduces the likelihood of bugs being introduced from outside the team.

- **More Meaningful Code Review**: In large projects with many contributors, code ownership can help ensure that changes to a specific part of the code are reviewed by those who are most familiar with it.

GitHub's implementation of a code ownership system is built around a file, [`.github/CODEOWNERS`](./.github/CODEOWNERS), which is committed to the repository and managed as a normal file. You can learn more about it [on GitHub](https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners).

The important ideas are:

1. Code owners are automatically requested for review when someone opens a pull request that modifies code that they own.

2. Code owners are not automatically requested to review draft pull requests.

3. When you mark a draft pull request as ready for review, code owners are automatically notified.

4. Approval from a code owner is required for merging a pull request affecting that section of the codebase.

5. Changes to CODEOWNERS do not take effect until they are merged to `main`.

6. Viewing the CODEOWNERS file in GitHub should provide debugging information.

As with everything else in this project, CODEOWNERS is subject to continual refinement and development. Please raise issues and suggest improvements where appropriate.