← All recipes
Moderne licensed

Replace Dependabot reviewers with CODEOWNERS

Recipe IDorg.openrewrite.github.ReplaceDependabotReviewersWithCodeownersArtifactorg.openrewrite.recipe:rewrite-github-actions

Replaces the removed reviewers option in .github/dependabot.yml with equivalent CODEOWNERS entries. Each reviewer is mapped onto the manifest files Dependabot updates for that package-ecosystem and directory, so ownership stays as narrow as the Dependabot configuration was. Update entries whose package-ecosystem has no known manifests are left untouched.

Single recipedependabotdependenciesgithubMSAL

Usage

This recipe has no required configuration options. You’ll need the Moderne CLI configured before running the command below.

mod run . --recipe org.openrewrite.github.ReplaceDependabotReviewersWithCodeowners

If the recipe isn’t available locally, install it with:

mod config recipes jar install org.openrewrite.recipe:rewrite-github-actions:RELEASE

Options

NameTypeDescription
codeownersPathStringWhere to write the migrated reviewers when the repository does not have a CODEOWNERS file yet. Defaults to .github/CODEOWNERS. When a CODEOWNERS file already exists in any of the locations GitHub recognizes, that file is appended to instead and this option is ignored.
e.g. CODEOWNERS

Data tables

Structured output this recipe can produce.

  • Source files that had resultsSource files that were modified by the recipe run.org.openrewrite.table.SourcesFileResults
  • Source files that had search resultsSearch results that were found during the recipe run.org.openrewrite.table.SearchResults
  • Source files that errored on a recipeThe details of all errors produced by a recipe run.org.openrewrite.table.SourcesFileErrors
  • Recipe performanceStatistics used in analyzing the performance of recipes.org.openrewrite.table.RecipeRunStats