-
Notifications
You must be signed in to change notification settings - Fork 18
feat: propose CODEOWNERS file when missing #325
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
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR enhances the cleanowners GitHub Action to create placeholder CODEOWNERS files for repositories that are missing them or have empty ones, rather than simply skipping those repositories.
Changes:
- Adds functionality to generate and propose placeholder CODEOWNERS files via pull requests for repositories without valid CODEOWNERS files
- Updates all user-facing messages and statistics to reflect "missing or empty CODEOWNERS files" instead of just "missing"
- Refactors the get_codeowners_file function to use a more concise loop structure
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| cleanowners.py | Implements placeholder CODEOWNERS generation, adds create_new parameter to commit_changes, refactors get_codeowners_file, and updates statistics messages |
| test_cleanowners.py | Adds comprehensive tests for new build_default_codeowners function, tests for create_new parameter, and updates empty file handling test expectations |
| markdown_writer.py | Updates markdown report messages to reflect "missing or empty" terminology |
| test_markdown_writer.py | Updates test expectations to match new "missing or empty" terminology |
| README.md | Documents the new behavior of creating placeholder CODEOWNERS files |
Add placeholder CODEOWNERS content for repos without one, and open a PR instead of skipping. Signed-off-by: Venu Vardhan Reddy Tekula <venuvrtekula@gmail.com>
b11665c to
0748f3e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 5 out of 5 changed files in this pull request and generated no new comments.
Fixes #23
Add placeholder CODEOWNERS content for repos without one, and open a PR instead of skipping.
Tested this on a test repository
https://github.com/vchrombie/cleanowners-test/actions/runs/21336076769/job/61408165828
vchrombie/cleanowners-test#1
Pull Request
Proposed Changes
Readiness Checklist
Author/Contributor
make lintand fix any issues that you have introducedmake testand ensure you have test coverage for the lines you are introducing@jeffrey-luszczReviewer
fix,documentation,enhancement,infrastructure,maintenanceorbreaking