codeowners-git 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (4) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +106 -0
  3. package/dist/cli.js +14738 -0
  4. package/package.json +65 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Hemand S
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,106 @@
1
+ # codeowners-git
2
+
3
+ Managing large-scale migrations in big monorepos with multiple codeowners can be overwhelming. Massive PRs touching thousands of files make it hard for teams to review changes efficiently.
4
+
5
+ `codeowners-git` solves this by:
6
+
7
+ - Identifying files owned by specific teams using the CODEOWNERS file.
8
+ - Creating compact, team-specific branches with only their affected files.
9
+ - Streamlining the review process with smaller, targeted PRs.
10
+
11
+ ## Installation
12
+
13
+ ### Using npx (recommended)
14
+
15
+ Run commands directly without installation:
16
+
17
+ ```bash
18
+ npx codeowners-git <command>
19
+ ```
20
+
21
+ ### Install globally via npm
22
+
23
+ ```bash
24
+ npm install -g codeowners-git
25
+ ```
26
+
27
+ Then run commands directly:
28
+
29
+ ```bash
30
+ codeowners-git <command>
31
+ ```
32
+
33
+ ## Configuration
34
+
35
+ The tool automatically detects CODEOWNERS files in:
36
+
37
+ 1. `.github/CODEOWNERS`
38
+ 2. `docs/CODEOWNERS`
39
+ 3. `CODEOWNERS` (root directory)
40
+
41
+ ## Commands
42
+
43
+ ### `list`
44
+
45
+ List current CODEOWNERS entries.
46
+
47
+ Usage:
48
+
49
+ ```bash
50
+ codeowners-git list [options]
51
+ ```
52
+
53
+ Options:
54
+
55
+ - `--owner, -o` Filter by specific owner
56
+ - `--include, -i` Include specific patterns
57
+
58
+ Example:
59
+
60
+ ```bash
61
+ codeowners-git list -o @myteam
62
+ ```
63
+
64
+ ### `branch`
65
+
66
+ Manage branch permissions in CODEOWNERS file.
67
+
68
+ Usage:
69
+
70
+ ```bash
71
+ codeowners-git branch [options]
72
+ ```
73
+
74
+ Options:
75
+
76
+ - `--owner, -o` Specify owner(s) to add/remove
77
+ - `--branch, -b` Specify branch pattern
78
+ - `--message, -m` Commit message for changes
79
+
80
+ Example:
81
+
82
+ ```bash
83
+ codeowners-git branch -o @myteam -b "feature/*" -m "Add feature branch ownership"
84
+ ```
85
+
86
+ ## Contributing
87
+
88
+ 1. Clone the repository
89
+ 2. Install dependencies:
90
+
91
+ ```bash
92
+ bun install
93
+ ```
94
+
95
+ 3. Make your changes
96
+ 4. Run tests:
97
+
98
+ ```bash
99
+ bun test
100
+ ```
101
+
102
+ 5. Submit a pull request
103
+
104
+ ## License
105
+
106
+ MIT ©