virtual-code-owners 8.2.0 → 8.2.2
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.
- package/README.md +3 -6
- package/dist/labeler-yml/generate.js +4 -3
- package/dist/version.js +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -5,12 +5,12 @@ This generates your `CODEOWNERS` file (_patterns_ x _users_) from
|
|
|
5
5
|
- a `VIRTUAL-CODEOWNERS.txt` (_patterns_ x _teams_)
|
|
6
6
|
- a `virtual-teams.yml` (_teams_ x _users_)
|
|
7
7
|
|
|
8
|
-
... which makes it easier to keep `CODEOWNERS` in sync on multi-team mono repos
|
|
9
|
-
|
|
8
|
+
... which makes it easier to keep `CODEOWNERS` in sync on multi-team mono repos
|
|
9
|
+
when you don't have (enough) 'real' GitHub or GitLab teams.
|
|
10
10
|
|
|
11
11
|
## Usage
|
|
12
12
|
|
|
13
|
-
- Rename
|
|
13
|
+
- Rename `.github/CODEOWNERS` to `.github/VIRTUAL-CODEOWNERS.txt` and put team names in them.
|
|
14
14
|
- Define teams that don't (yet) exist on GitHub level in `.github/virtual-teams.yml`
|
|
15
15
|
- Run this:
|
|
16
16
|
|
|
@@ -144,9 +144,6 @@ libs/baarden/ jan@example.com korneel@example.com pier@example.com tjorus@
|
|
|
144
144
|
### Any gotcha's?
|
|
145
145
|
|
|
146
146
|
- It won't check whether the users or teams you entered exist.
|
|
147
|
-
- Only relevant when you're on GitLab: Section heading support is experimental
|
|
148
|
-
and when generating labeler.yml default section owners aren't expanded to
|
|
149
|
-
section rules.
|
|
150
147
|
|
|
151
148
|
### Do I have to run this each time I edit `VIRTUAL-CODEOWNERS.txt`?
|
|
152
149
|
|
|
@@ -30,9 +30,10 @@ export default function generateLabelerYml(
|
|
|
30
30
|
}
|
|
31
31
|
function getPatternsForTeam(pCodeOwners, pTeamName) {
|
|
32
32
|
return pCodeOwners
|
|
33
|
-
.filter(
|
|
34
|
-
|
|
35
|
-
|
|
33
|
+
.filter(
|
|
34
|
+
(pLine) =>
|
|
35
|
+
pLine.type === "rule" && lineContainsTeamName(pLine, pTeamName),
|
|
36
|
+
)
|
|
36
37
|
.map((pLine) => pLine.filesPattern);
|
|
37
38
|
}
|
|
38
39
|
function transformForYamlAndMinimatch(pOriginalString) {
|
package/dist/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = "8.2.
|
|
1
|
+
export const VERSION = "8.2.2";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "virtual-code-owners",
|
|
3
|
-
"version": "8.2.
|
|
3
|
+
"version": "8.2.2",
|
|
4
4
|
"description": "CODEOWNERS with teams for teams that can't use GitHub teams",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"url": "https://github.com/sverweij/virtual-code-owners/issues"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"yaml": "2.
|
|
29
|
+
"yaml": "^2.5.1"
|
|
30
30
|
},
|
|
31
31
|
"engines": {
|
|
32
32
|
"node": "^18.11.0||>=20.0.0"
|