@swapniltech0390/nx-codeowners
TypeScript icon, indicating that this package has built-in type declarations

1.0.4 • Public • Published

NX Plugin to generate CODEOWNERS file for GITHUB

@swapniltech0390/nx-codeowners:codeowners

This library can be used to generate CODEOWNERS file for NX projects on GITHUB.

Executor

1 Install pacakge

npm i @swapniltech0390/nx-codeowners

2 Add in root project.json

Properties to be added in executor

  1. coreReviewers : Default set of core reviewers if reviewer missing in project json.
  2. sources : List of path to iterate through and find all application and libraries inside these folder to set reviewe in CODEOWNERS.
"codeowners": {
    "executor": "@swapniltech0390/nx-codeowners:codeowners",
    "options": {
        "coreReviewers": [
        "@github_id","@github_id" // List of Github ID for review of application or library
        ],
        "sources": ["apps","libs"] // List of path where application / Libraries are placed from root
    }
}

3 Add reviewers in project.json for Application or Libraries

NOTE reviewers should be valid github user ID or Group Name

{
"name": "appName",
 // ...
"tags": [],
"reviewers": [
"@github_id","@github_id" // List of Github ID for review of application / library
]
}

4 Run the executor from root to generate CODEOWNERS

nx run <ProjectName>:codeowners

Output :

New CODEOWNERS file generated at root with reviewers mapping for respective applications & libraries

Readme

Keywords

none

Package Sidebar

Install

npm i @swapniltech0390/nx-codeowners

Weekly Downloads

1

Version

1.0.4

License

none

Unpacked Size

9.64 kB

Total Files

11

Last publish

Collaborators

  • swapniljain_90