Skip to content

Commit f274f7c

Browse files
authored
Update a few bits of the README, add links (#11)
1 parent 130f20d commit f274f7c

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

README.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,17 @@
11
# CodeOwnership
2-
This gem helps engineering teams declare ownership of code.
32

4-
Check out `lib/code_ownership.rb` to see the public API.
3+
This gem helps engineering teams declare ownership of code. This gem works best in large, usually monolithic code bases where many teams work together.
54

6-
Check out `code_ownership_spec.rb` to see examples of how code ownership is used.
5+
Check out [`lib/code_ownership.rb`](https://github.com/rubyatscale/code_ownership/blob/main/lib/code_ownership.rb) to see the public API.
6+
7+
Check out [`code_ownership_spec.rb`](https://github.com/rubyatscale/code_ownership/blob/main/spec/lib/code_ownership_spec.rb) to see examples of how code ownership is used.
78

89
There is also a [companion VSCode Extension]([url](https://github.com/rubyatscale/code-ownership-vscode)) for this gem. Just search `Gusto.code-ownership-vscode` in the VSCode Extension Marketplace.
910

1011
## Usage: Declaring Ownership
12+
1113
There are three ways to declare code ownership using this gem.
14+
1215
### Package-Based Ownership
1316
Package based ownership integrates [`packwerk`](https://github.com/Shopify/packwerk) and has ownership defined per package. To define that all files within a package are owned by one team, configure your `package.yml` like this:
1417
```yml
@@ -71,7 +74,9 @@ See `code_ownership_spec.rb` for an example.
7174
A `CODEOWNERS` file defines who owns specific files or paths in a repository. When you run `bin/codeownership validate`, a `.github/CODEOWNERS` file will automatically be generated and updated.
7275

7376
## Proper Configuration & Validation
77+
7478
CodeOwnership comes with a validation function to ensure the following things are true:
79+
7580
1) Only one mechanism is defining file ownership. That is -- you can't have a file annotation on a file owned via package-based or glob-based ownership. This helps make ownership behavior more clear by avoiding concerns about precedence.
7681
2) All teams referenced as an owner for any file or package is a valid team (i.e. it's in the list of `CodeTeams.all`).
7782
3) All files have ownership. You can specify in `unowned_globs` to represent a TODO list of files to add ownership to.

0 commit comments

Comments
 (0)