Skip to content

Conversation

@vchrombie
Copy link

@vchrombie vchrombie commented Jan 25, 2026

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

  • If documentation is needed for this change, has that been included in this pull request
  • run make lint and fix any issues that you have introduced
  • run make test and ensure you have test coverage for the lines you are introducing
  • If publishing new data to the public (scorecards, security scan results, code quality results, live dashboards, etc.), please request review from @jeffrey-luszcz

Reviewer

  • Label as either fix, documentation, enhancement, infrastructure, maintenance or breaking

@vchrombie vchrombie requested a review from a team as a code owner January 25, 2026 16:51
Copilot AI review requested due to automatic review settings January 25, 2026 16:51
Copy link

Copilot AI left a 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

@vchrombie vchrombie changed the title feat: propose CODEOWNERS file when missing feat: propose CODEOWNERS file when missing (#23) Jan 25, 2026
@vchrombie vchrombie changed the title feat: propose CODEOWNERS file when missing (#23) feat: propose CODEOWNERS file when missing Jan 25, 2026
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>
Copy link

Copilot AI left a 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Instead of skipping repos with no existing codeowners, create a pr to suggest one

1 participant