You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,7 +19,7 @@ metadata:
19
19
```
20
20
21
21
### Glob-Based Ownership
22
-
In your team's configured YML (see [`bigrails-teams`](https://github.com/rubyatscale/bigrails-teams)), you can set `owned_globs` to be a glob of files your team owns. For example, in `my_team.yml`:
22
+
In your team's configured YML (see [`code_teams`](https://github.com/rubyatscale/code_teams)), you can set `owned_globs` to be a glob of files your team owns. For example, in `my_team.yml`:
23
23
```yml
24
24
name: My Team
25
25
owned_globs:
@@ -33,7 +33,7 @@ File annotations are a last resort if there is no clear home for your code. File
33
33
```
34
34
## Usage: Reading CodeOwnership
35
35
### `for_file`
36
-
`CodeOwnership.for_file`, given a relative path to a file returns a `Teams::Team` if there is a team that owns the file, `nil` otherwise.
36
+
`CodeOwnership.for_file`, given a relative path to a file returns a `CodeTeams::Team` if there is a team that owns the file, `nil` otherwise.
@@ -44,7 +44,7 @@ Contributor note: If you are making updates to this method or the methods gettin
44
44
See `code_ownership_spec.rb` for examples.
45
45
46
46
### `for_backtrace`
47
-
`CodeOwnership.for_backtrace`can be given a backtrace and will either return `nil`, or a `Teams::Team`.
47
+
`CodeOwnership.for_backtrace`can be given a backtrace and will either return `nil`, or a `CodeTeams::Team`.
48
48
49
49
```ruby
50
50
CodeOwnership.for_backtrace(exception.backtrace)
@@ -56,7 +56,7 @@ See `code_ownership_spec.rb` for an example.
56
56
57
57
### `for_class`
58
58
59
-
`CodeOwnership.for_class`can be given a class and will either return `nil`, or a `Teams::Team`.
59
+
`CodeOwnership.for_class`can be given a class and will either return `nil`, or a `CodeTeams::Team`.
60
60
61
61
```ruby
62
62
CodeOwnership.for_class(MyClass.name)
@@ -73,7 +73,7 @@ A `CODEOWNERS` file defines who owns specific files or paths in a repository. Wh
73
73
## Proper Configuration & Validation
74
74
CodeOwnership comes with a validation function to ensure the following things are true:
75
75
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.
76
-
2) All teams referenced as an owner for any file or package is a valid team (i.e. it's in the list of `Teams.all`).
76
+
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`).
77
77
3) All files have ownership. You can specify in `unowned_globs` to represent a TODO list of files to add ownership to.
78
78
3) The `.github/CODEOWNERS` file is up to date. This is automatically corrected and staged unless specified otherwise with `bin/codeownership validate --skip-autocorrect --skip-stage`. You can turn this validation off by setting `skip_codeowners_validation: true` in `code_ownership.yml`.
raiseStandardError,"Could not find team with name: `#{team_name}` in #{location_of_reference}. Make sure the team is one of `#{Teams.all.map(&:name).sort}`"
99
+
raiseStandardError,"Could not find team with name: `#{team_name}` in #{location_of_reference}. Make sure the team is one of `#{CodeTeams.all.map(&:name).sort}`"
0 commit comments