Skip to content

fix: exclude test files from CODEOWNERS foundation approval#27919

Merged
Udit-takkar merged 3 commits intomainfrom
devin/1770968687-exclude-test-files-from-codeowners
Feb 13, 2026
Merged

fix: exclude test files from CODEOWNERS foundation approval#27919
Udit-takkar merged 3 commits intomainfrom
devin/1770968687-exclude-test-files-from-codeowners

Conversation

@hariombalhara
Copy link
Copy Markdown
Member

@hariombalhara hariombalhara commented Feb 13, 2026

What does this PR do?

PRs that only modify test files currently require Foundation team approval because those files fall under CODEOWNERS-covered directories (e.g. packages/features/bookings/lib/**/*). This adds override patterns at the end of CODEOWNERS to remove code ownership from test files, so they no longer trigger approval requirements.

In GitHub CODEOWNERS, later rules take precedence. Patterns with no owners assigned effectively clear ownership for matching files.

The following test file patterns are excluded:

  • **/*.spec.*
  • **/*.e2e.*
  • **/*.test.*
  • **/*.integration-test.*

How should this be tested?

  1. Open a PR that only touches test files (.spec.*, .e2e.*, .test.*, or .integration-test.*) under a Foundation-owned path (e.g. packages/features/bookings/lib/)
  2. Verify that the PR no longer lists @calcom/Foundation or @calcom/Consumer as required reviewers

Mandatory Tasks (DO NOT REMOVE)

  • I have self-reviewed the code (A decent size PR without self-review might be rejected).
  • I have updated the developer docs in /docs if this PR makes changes that would require a documentation change. N/A
  • I confirm automated tests are in place that prove my fix is effective or that my feature works. N/A — CODEOWNERS changes are validated by GitHub at PR time.

Human Review Checklist

  • Verify that removing all code ownership (not just Foundation) from test files is the desired behavior — these patterns also clear @calcom/Consumer ownership if a test file falls under a Consumer-owned path (e.g. packages/ui/**/*)
  • Confirm the glob patterns (**/*.spec.*, **/*.e2e.*, **/*.test.*, **/*.integration-test.*) match the intended file naming conventions used across the repo
  • Consider whether test infrastructure files (fixtures, utilities) should remain under code ownership — these patterns only match files with the listed suffixes in their name, not entire test directories

Link to Devin run: https://app.devin.ai/sessions/84166a44e2204df290f844112fa52a29
Requested by: @hariombalhara

Co-Authored-By: hariom@cal.com <hariombalhara@gmail.com>
@devin-ai-integration
Copy link
Copy Markdown
Contributor

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR that start with 'DevinAI' or '@devin'.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

@graphite-app graphite-app bot added the core area: core, team members only label Feb 13, 2026
@graphite-app graphite-app bot requested a review from a team February 13, 2026 07:46
@graphite-app graphite-app bot added the enterprise area: enterprise, audit log, organisation, SAML, SSO label Feb 13, 2026
Copy link
Copy Markdown
Contributor

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

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

Devin Review found 1 potential issue.

Open in Devin Review

Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

No issues found across 1 file

@paragon-review
Copy link
Copy Markdown

Paragon: tests updated

1 updated test generated for this PR.

Updated Tests

  • CODEOWNERS test file exclusion validation — Tests that validate the CODEOWNERS configuration correctly excludes *.spec. and *.e2e. test files from requiring foundation/consumer team approval while preserving ownership for all source files. Covers: file structure parsing, exclusion pattern existence and placement, pattern matching for spec/e2e files across all owned directories (packages/ui, packages/prisma, packages/embeds, apps/api, packages/platform, packages/trpc, packages/features/bookings), ownership retention for non-test files, edge cases (.test.ts files NOT excluded, directory names containing spec/e2e, integration-test files), and helper function unit tests for the CODEOWNERS pattern parser and resolver.

Accept Changes Open in Paragon

Details

Updated Tests

  • CODEOWNERS test file exclusion validation (unit)

devin-ai-integration bot and others added 2 commits February 13, 2026 08:12
Co-Authored-By: hariom@cal.com <hariombalhara@gmail.com>
Co-Authored-By: hariom@cal.com <hariombalhara@gmail.com>
@Udit-takkar Udit-takkar merged commit 4c6af56 into main Feb 13, 2026
79 checks passed
@Udit-takkar Udit-takkar deleted the devin/1770968687-exclude-test-files-from-codeowners branch February 13, 2026 08:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core area: core, team members only enterprise area: enterprise, audit log, organisation, SAML, SSO ready-for-e2e size/XS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants