intro to owners

Setup

  1. Activate Powerpack if you haven't already

  2. Install the package

  3. Configure ownership

nx.json
1{ 2 "owners": { 3 "format": "github", // defaults to "github" 4 "outputPath": "tools/CODEOWNERS", // defaults to ".github/CODEOWNERS" 5 "patterns": [ 6 { 7 "description": "Joe should double check all changes to rust code", 8 "projects": ["tag:rust"], 9 "owners": ["@joelovesrust"] 10 }, 11 { 12 "description": "The Finance team owns these projects", 13 "projects": ["finance-*"], 14 "owners": ["@finance-team"] 15 }, 16 { 17 "description": "Alice, Bob and Cecil work together on these projects", 18 "projects": ["admin", "booking", "cart"], 19 "owners": ["@alice", "@bob", "@cecil"] 20 }, 21 { 22 "description": "CI Workflows", 23 "files": [".github/workflows/**/*"], 24 "owners": ["@devops"] 25 } 26 ] 27 } 28} 29
packages/my-project/project.json
1{ 2 "owners": { 3 "**/*": ["@ahmed", "@petra"], 4 "package.json": ["@ahmed"], 5 "README.md": [{ 6 "owners": "@jared", 7 "description": "Jared is very particular about the README file" 8 }] 9 }, 10}; 11
  1. Configure CI

Link to nx sync concept page Add nx sync:check to the beginning of the CI process Add nx sync as a git push or commit hook