MetaMask / MetaMask/metamask-mobile

CODEOWNERS pattern **/Perps/** is too broad and incorrectly matches unrelated components

Open
#26,280 1 comment 0 reactions 0 assignees View on GitHub
INVALID-ISSUE-TEMPLATE
Dominant language
TypeScript
Stars
3k
Forks
1.7k
Avg merge
1d 14h
Merged PRs (30d)
669

Description

https://github.com/MetaMask/metamask-mobile/blob/599523b1ad2e59d8d18c9d1fcd75a52b91316aec/.github/CODEOWNERS#L163

# Issue: CODEOWNERS pattern `**/Perps/**` is too broad and incorrectly matches unrelated components

## Description

The CODEOWNERS pattern `**/Perps/**` on line 163 is too permissive and is incorrectly targeting components that are not owned by the Perps team.

**Affected component:** `Perps/PerpsSection.tsx`

## Problem

The current pattern `**/Perps/**` matches any file or directory with "Perps" in its path, regardless of its actual ownership or purpose. This causes the new component `PerpsSection.tsx` to be automatically assigned to the Perps team for review, even though it is not actually owned or maintained by them.

## Impact

- Pull requests touching `PerpsSection.tsx` will incorrectly request reviews from the Perps team
- Creates confusion about component ownership
- May delay PR reviews if the wrong team is notified
- Could lead to improper review coverage if the actual owning team is not notified

## Suggested Solutions

1. **Make the pattern more specific** - Change from `**/Perps/**` to a more specific path that only matches the actual Perps team's components:
```
/path/to/actual/perps/components/**
```

2. **Add an exception** - Add a more specific rule above the current one to assign `PerpsSection.tsx` to the correct team:
```
**/Perps/PerpsSection.tsx @correct-team
**/Perps/** @perps-team
```

3. **Rename the component** - If `PerpsSection.tsx` is not related to Perps functionality, consider renaming it to avoid confusion.

## Additional Context

Reference: [CODEOWNERS Line 163](https://github.com/MetaMask/metamask-mobile/blob/599523b1ad2e59d8d18c9d1fcd75a52b91316aec/.github/CODEOWNERS#L163)

Please clarify which team should own `PerpsSection.tsx` and update the CODEOWNERS file accordingly.

Contributor guide

Open the contributing guide

Research direction

Start by reading .github/CODEOWNERS at line 163 and inspect the affected Perps/PerpsSection.tsx path in the referenced revision. Determine which team owns that component before choosing between narrowing the pattern or adding an exception. Done means the CODEOWNERS rule no longer assigns unrelated components to the Perps team and the intended ownership is explicit.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.