virtual-code-owners 5.0.0 → 5.1.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.
|
@@ -7,7 +7,8 @@ const DEFAULT_WARNING = `#${EOL}` +
|
|
|
7
7
|
`#${EOL}` +
|
|
8
8
|
`# - edit .github/VIRTUAL-CODEOWNERS.txt${EOL}` +
|
|
9
9
|
`# - and/ or add team members to .github/virtual-teams.yml${EOL}` +
|
|
10
|
-
`# - run 'npx virtual-code-owners'${EOL}` +
|
|
10
|
+
`# - run 'npx virtual-code-owners' (or 'npx virtual-code-owners --emitLabeler' if you also${EOL}` +
|
|
11
|
+
`# want to generate a .github/labeler.yml)${EOL}` +
|
|
11
12
|
`#${EOL}${EOL}`;
|
|
12
13
|
export default function generateCodeOwners(pVirtualCodeOwners, pTeamMap, pGeneratedWarning = DEFAULT_WARNING) {
|
|
13
14
|
return (pGeneratedWarning +
|
|
@@ -1,6 +1,15 @@
|
|
|
1
1
|
import { EOL } from "node:os";
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
const DEFAULT_WARNING = `#${EOL}` +
|
|
3
|
+
`# DO NOT EDIT - this file is generated and your edits will be overwritten${EOL}` +
|
|
4
|
+
`#${EOL}` +
|
|
5
|
+
`# To make changes:${EOL}` +
|
|
6
|
+
`#${EOL}` +
|
|
7
|
+
`# - edit .github/VIRTUAL-CODEOWNERS.txt${EOL}` +
|
|
8
|
+
`# - and/ or add teams (& members) to .github/virtual-teams.yml${EOL}` +
|
|
9
|
+
`# - run 'npx virtual-code-owners --emitLabeler'${EOL}` +
|
|
10
|
+
`#${EOL}${EOL}`;
|
|
11
|
+
export default function generateLabelerYml(pCodeOwners, pTeamMap, pGeneratedWarning = DEFAULT_WARNING) {
|
|
12
|
+
let lReturnValue = pGeneratedWarning;
|
|
4
13
|
for (const lTeamName in pTeamMap) {
|
|
5
14
|
const lPatternsForTeam = getPatternsForTeam(pCodeOwners, lTeamName)
|
|
6
15
|
.map((pPattern) => ` - ${transformForYamlAndMinimatch(pPattern)}${EOL}`)
|
package/dist/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = "5.
|
|
1
|
+
export const VERSION = "5.1.0";
|