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
* docs: Update `help` example text
CHanges formatting to `text` to handle some odd syntax highlighting
* docs: Add benchmarks and example output
* docs: Expand benchmark output
- fix example code from local binary
- remove 'unsupported' note
Copy file name to clipboardExpand all lines: README.md
+75-6Lines changed: 75 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,18 +2,41 @@
2
2
This is a CLI tool to generate [GitHub `CODEOWNERS` files](https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners) from an existing project assuming certain conventions around file annotations and Ruby/Javascript packages.
3
3
It's also the [oxidation](https://wiki.mozilla.org/Oxidation) of an existing [CLI tool](https://github.com/rubyatscale/code_ownership) written in Ruby.
4
4
5
+
Targeting a large project, `codeowners` can be signifcantly faster than `codeownership`:
A CLI to validate and generate Github's CODEOWNERS file
9
31
10
32
Usage: codeowners [OPTIONS] <COMMAND>
11
33
12
34
Commands:
13
-
generate Generate the CODEOWNERS file and save it to '--codeowners-file-path'
14
-
validate Validate the validity of the CODEOWNERS file. A validation failure will exit with a failure code and a detailed output of the validation errors
15
-
generate-and-validate Chains both 'generate' and 'validate' commands
16
-
for-file Print the owners for a given file
35
+
for-file Finds the owner of a given file. [aliases: f]
36
+
for-team Finds code ownership information for a given team [aliases: t]
37
+
generate Generate the CODEOWNERS file and save it to '--codeowners-file-path'. [aliases: g]
38
+
validate Validate the validity of the CODEOWNERS file. A validation failure will exit with a failure code and a detailed output of the validation errors. [aliases: v]
39
+
generate-and-validate Chains both `generate` and `validate` commands. [aliases: gv]
17
40
help Print this message or the help of the given subcommand(s)
Description: Owner annotation at the top of the file, Owner defined in `javascript/packages/PayrollFlow/package.json` with implicity owned glob: `javascript/packages/PayrollFlow/**/**`
65
+
66
+
```
67
+
68
+
#### for-team
69
+
70
+
Finds code ownership information for a given team.
71
+
72
+
```text
73
+
$ codeowners for-team Payroll
74
+
75
+
# Code Ownership Report for `Payroll` Team
76
+
77
+
## Annotations at the top of file
78
+
/javascript/packages/PayrollFlow/index.tsx
79
+
/ruby/app/models/payroll.rb
80
+
81
+
## Team-specific owned globs
82
+
This team owns nothing in this category.
83
+
84
+
## Owner in .codeowner
85
+
/ruby/app/payroll/**/**
86
+
87
+
## Owner metadata key in package.yml
88
+
/ruby/packages/payroll_flow/**/**
89
+
90
+
## Owner metadata key in package.json
91
+
/javascript/packages/PayrollFlow/**/**
92
+
93
+
## Team YML ownership
94
+
/config/teams/payroll.yml
95
+
96
+
## Team owned gems
97
+
/gems/payroll_calculator/**/**
98
+
```
99
+
100
+
32
101
### Adoption
33
-
This is an experimental port that might never be supported, use at your own risk and be prepared to fallback to the Ruby implementation if it stops working, if you still wish to adopt it, here are the instructions:
102
+
This is an experimental port, use at your own risk and be prepared to fallback to the Ruby implementation if it stops working, if you still wish to adopt it, here are the instructions:
0 commit comments