@payfit/nx-core 5.2.5 โ 5.3.0-ephemeral-labels-executor.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.
- package/dist/src/executors/preview-deploy/executor.js +2 -19
- package/dist/src/executors/preview-deploy/executor.js.map +1 -1
- package/dist/src/executors/preview-labels/executor.d.ts +7 -0
- package/dist/src/executors/preview-labels/executor.js +90 -0
- package/dist/src/executors/preview-labels/executor.js.map +1 -0
- package/dist/src/executors/preview-labels/schema.json +17 -0
- package/dist/src/index.js +8 -0
- package/dist/src/index.js.map +1 -1
- package/dist/src/scripts/nx-core-updater.js +60 -311
- package/dist/src/utils/common/environment.d.ts +1 -0
- package/dist/src/utils/common/environment.js +11 -0
- package/dist/src/utils/common/environment.js.map +1 -0
- package/dist/src/utils/common/octokit.d.ts +2 -0
- package/dist/src/utils/common/octokit.js +22 -0
- package/dist/src/utils/common/octokit.js.map +1 -0
- package/executors.json +5 -0
- package/package.json +1 -1
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const auth_app_1 = require("@octokit/auth-app");
|
|
4
|
-
const rest_1 = require("@octokit/rest");
|
|
5
3
|
const yaml = require("yaml");
|
|
6
4
|
const logger_1 = require("../../utils/common/logger");
|
|
5
|
+
const octokit_1 = require("../../utils/common/octokit");
|
|
7
6
|
const argocdOverride_1 = require("./argocdOverride");
|
|
8
7
|
const kargoPolicy_1 = require("./kargoPolicy");
|
|
9
8
|
function readFileYamlContent(file) {
|
|
@@ -27,25 +26,9 @@ function readFileYamlContent(file) {
|
|
|
27
26
|
throw new Error(`Failed to parse YAML file: ${error}`);
|
|
28
27
|
}
|
|
29
28
|
}
|
|
30
|
-
function getEnvVar(name) {
|
|
31
|
-
const value = process.env[name];
|
|
32
|
-
if (!value) {
|
|
33
|
-
throw new Error(`Missing env var ${name}`);
|
|
34
|
-
}
|
|
35
|
-
return value;
|
|
36
|
-
}
|
|
37
29
|
const runExecutor = async (options) => {
|
|
38
30
|
logger_1.consola.box(`Start preview deploy switch for ${options.targetAppName} to target branch ${options.targetBranchName} on the ${options.targetEnv} env`);
|
|
39
|
-
const octokit =
|
|
40
|
-
? new rest_1.Octokit({ auth: process.env.GITHUB_TOKEN })
|
|
41
|
-
: new rest_1.Octokit({
|
|
42
|
-
authStrategy: auth_app_1.createAppAuth,
|
|
43
|
-
auth: {
|
|
44
|
-
appId: getEnvVar('GITHUB_APP_ID'),
|
|
45
|
-
privateKey: getEnvVar('GITHUB_PRIVATE_KEY'),
|
|
46
|
-
installationId: getEnvVar('GITHUB_INSTALLATION_ID'),
|
|
47
|
-
},
|
|
48
|
-
});
|
|
31
|
+
const octokit = (0, octokit_1.OctokitAuth)();
|
|
49
32
|
const argocdOverridePath = `apps/${options.targetAppName}/${options.targetEnv}/.argocd-override.yaml`;
|
|
50
33
|
const kargoPolicyPath = `.kargo/policy.yaml`;
|
|
51
34
|
const message = `chore(${options.targetAppName}): switch deployment branch to ${options.targetBranchName} on ${options.targetEnv}`;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"executor.js","sourceRoot":"","sources":["../../../../src/executors/preview-deploy/executor.ts"],"names":[],"mappings":";;AACA,
|
|
1
|
+
{"version":3,"file":"executor.js","sourceRoot":"","sources":["../../../../src/executors/preview-deploy/executor.ts"],"names":[],"mappings":";;AACA,6BAA4B;AAE5B,sDAAmD;AACnD,wDAAwD;AACxD,qDAAuD;AACvD,+CAA8D;AAM9D,SAAS,mBAAmB,CAAC,IAAS;IACpC,IAAI,CAAC,IAAI,EAAE,CAAC;QACV,OAAO,SAAS,CAAA;IAClB,CAAC;IAED,0CAA0C;IAC1C,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;QAC7B,MAAM,IAAI,KAAK,CAAC,uCAAuC,CAAC,CAAA;IAC1D,CAAC;IAED,4CAA4C;IA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CAAA;IACJ,CAAC;IAED,gBAAO,CAAC,OAAO,CAAC,iCAAiC,CAAC,CAAA;IAElD,OAAO;QACL,OAAO,EAAE,IAAI;KACd,CAAA;AACH,CAAC,CAAA;AAED,kBAAe,WAAW,CAAA"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ExecutorContext } from '@nx/devkit';
|
|
2
|
+
import { Octokit } from '@octokit/rest';
|
|
3
|
+
import { PreviewLabelsExecutorOptions, PreviewLabelsExecutorSchema } from './schema';
|
|
4
|
+
export declare function getDeterministicColorFromName(name: string): string;
|
|
5
|
+
export declare function managePreviewLabels(projectList: string[], octokit: Octokit, owner: string, repo: string): Promise<void>;
|
|
6
|
+
declare const runExecutor: (options: PreviewLabelsExecutorOptions, context: ExecutorContext) => Promise<PreviewLabelsExecutorSchema>;
|
|
7
|
+
export default runExecutor;
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getDeterministicColorFromName = getDeterministicColorFromName;
|
|
4
|
+
exports.managePreviewLabels = managePreviewLabels;
|
|
5
|
+
const github_1 = require("../../utils/common/github");
|
|
6
|
+
const logger_1 = require("../../utils/common/logger");
|
|
7
|
+
const octokit_1 = require("../../utils/common/octokit");
|
|
8
|
+
function getDeterministicColorFromName(name) {
|
|
9
|
+
let hash = 0;
|
|
10
|
+
for (let i = 0; i < name.length; i++) {
|
|
11
|
+
hash = name.charCodeAt(i) + ((hash << 5) - hash);
|
|
12
|
+
}
|
|
13
|
+
const hex = (hash >>> 0).toString(16).slice(-6).padStart(6, '0');
|
|
14
|
+
const r = parseInt(hex.slice(0, 2), 16);
|
|
15
|
+
const g = parseInt(hex.slice(2, 4), 16);
|
|
16
|
+
const b = parseInt(hex.slice(4, 6), 16);
|
|
17
|
+
return hex;
|
|
18
|
+
}
|
|
19
|
+
function normalizeProjectName(name) {
|
|
20
|
+
return name.replace(/^@payfit\//, '');
|
|
21
|
+
}
|
|
22
|
+
async function managePreviewLabels(projectList, octokit, owner, repo) {
|
|
23
|
+
// Get existing labels from the repository
|
|
24
|
+
const { data: existingLabels } = await octokit.rest.issues.listLabelsForRepo({
|
|
25
|
+
owner,
|
|
26
|
+
repo,
|
|
27
|
+
});
|
|
28
|
+
// Create a set of expected labels based on the application list
|
|
29
|
+
const expectedLabels = new Set(projectList.map(app => `:eyes:/${app}`));
|
|
30
|
+
// Find existing preview labels (labels that start with :eyes:)
|
|
31
|
+
const existingPreviewLabels = existingLabels.filter(label => label.name.startsWith(':eyes:/'));
|
|
32
|
+
// Add missing labels
|
|
33
|
+
for (const expectedLabel of expectedLabels) {
|
|
34
|
+
const exists = existingPreviewLabels.some(label => label.name === expectedLabel);
|
|
35
|
+
if (!exists) {
|
|
36
|
+
logger_1.consola.info(`Adding label: ${expectedLabel}`);
|
|
37
|
+
const appName = expectedLabel.replace(':eyes:/', '');
|
|
38
|
+
const color = getDeterministicColorFromName(appName);
|
|
39
|
+
await octokit.rest.issues.createLabel({
|
|
40
|
+
owner,
|
|
41
|
+
repo,
|
|
42
|
+
name: expectedLabel,
|
|
43
|
+
color,
|
|
44
|
+
description: `Preview label for ${expectedLabel.replace(':eyes:/', '')} application`,
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
// Remove labels that are no longer needed
|
|
49
|
+
for (const existingLabel of existingPreviewLabels) {
|
|
50
|
+
if (!expectedLabels.has(existingLabel.name)) {
|
|
51
|
+
logger_1.consola.info(`Removing label: ${existingLabel.name}`);
|
|
52
|
+
await octokit.rest.issues.deleteLabel({
|
|
53
|
+
owner,
|
|
54
|
+
repo,
|
|
55
|
+
name: existingLabel.name,
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
const runExecutor = async (options, context) => {
|
|
61
|
+
try {
|
|
62
|
+
logger_1.consola.info('Starting preview labels management');
|
|
63
|
+
// Extract application names from the list
|
|
64
|
+
const applicationNames = options.projectList.map(app => typeof app === 'string' ? app : app.name).map(normalizeProjectName);
|
|
65
|
+
// Filter out applications that don't exist in the workspace
|
|
66
|
+
const projectsMap = context.projectsConfigurations?.projects || {};
|
|
67
|
+
const normalizedProjectNames = new Set(Object.keys(projectsMap).map(normalizeProjectName));
|
|
68
|
+
const validApplicationNames = applicationNames.filter(appName => {
|
|
69
|
+
const exists = normalizedProjectNames.has(appName);
|
|
70
|
+
if (!exists) {
|
|
71
|
+
logger_1.consola.warn(`Project '${appName}' not found in workspace, skipping label creation`);
|
|
72
|
+
}
|
|
73
|
+
return exists;
|
|
74
|
+
});
|
|
75
|
+
const octokit = (0, octokit_1.OctokitAuth)();
|
|
76
|
+
await managePreviewLabels(validApplicationNames, octokit, 'PayFit', await (0, github_1.getGitRepositoryName)());
|
|
77
|
+
logger_1.consola.success('Preview labels management completed successfully');
|
|
78
|
+
return {
|
|
79
|
+
success: true,
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
catch (error) {
|
|
83
|
+
logger_1.consola.error('Preview labels management failed:', error);
|
|
84
|
+
return {
|
|
85
|
+
success: false,
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
};
|
|
89
|
+
exports.default = runExecutor;
|
|
90
|
+
//# sourceMappingURL=executor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"executor.js","sourceRoot":"","sources":["../../../../src/executors/preview-labels/executor.ts"],"names":[],"mappings":";;AAWA,sEAUC;AAMD,kDAkDC;AA1ED,sDAAgE;AAChE,sDAAmD;AACnD,wDAAwD;AAMxD,SAAgB,6BAA6B,CAAC,IAAY;IACxD,IAAI,IAAI,GAAG,CAAC,CAAA;IACZ,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;QACrC,IAAI,GAAG,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC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schema.org/schema",
|
|
3
|
+
"version": 2,
|
|
4
|
+
"title": "Preview labels",
|
|
5
|
+
"description": "Use it to setup application labels from GHA",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"properties": {
|
|
8
|
+
"projectList": {
|
|
9
|
+
"type": "array",
|
|
10
|
+
"items": {
|
|
11
|
+
"type": "string"
|
|
12
|
+
},
|
|
13
|
+
"description": "List of applications to setup labels for"
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
"required": ["projectList"]
|
|
17
|
+
}
|
package/dist/src/index.js
CHANGED
|
@@ -108,6 +108,14 @@ async function createNodesInternal(configFilePath, options, _context) {
|
|
|
108
108
|
description: previewDeployConfig.description,
|
|
109
109
|
},
|
|
110
110
|
};
|
|
111
|
+
const previewLabelsConfig = (0, devkit_1.readJsonFile)((0, path_1.join)(__dirname, '/executors/preview-labels/schema.json'));
|
|
112
|
+
targets['preview-labels'] = {
|
|
113
|
+
executor: '@payfit/nx-core:preview-labels',
|
|
114
|
+
cache: false,
|
|
115
|
+
metadata: {
|
|
116
|
+
description: previewLabelsConfig.description,
|
|
117
|
+
},
|
|
118
|
+
};
|
|
111
119
|
const releaseConfig = (0, devkit_1.readJsonFile)((0, path_1.join)(__dirname, '/executors/release/schema.json'));
|
|
112
120
|
targets['release'] = {
|
|
113
121
|
executor: '@payfit/nx-core:release',
|
package/dist/src/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;AA8BA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;AA8BA,kDA8OC;AA5QD,+BAAoC;AAEpC,uCAOmB;AAInB,gDAAmD;AACnD,kDAA+C;AAC/C,0CAA2D;AAE9C,QAAA,aAAa,GAA4C;IACpE,iBAAiB;IACjB,KAAK,EAAE,WAAW,EAAE,OAAO,EAAE,OAAO,EAAE,EAAE;QACtC,O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AE,KAAK;YACZ,MAAM,EAAE,CAAC,YAAY,EAAE,aAAa,CAAC;YACrC,OAAO,EAAE,EAAE;YACX,OAAO,EAAE;gBACP,GAAG,EAAE,eAAe;gBACpB,QAAQ,EAAE;oBACR,0BAA0B;oBAC1B,eAAe;oBACf,QAAQ;oBACR,eAAe;iBAChB;gBACD,QAAQ,EAAE,KAAK;aAChB;YACD,GAAG,EAAE;gBACH,kBAAkB,EAAE,OAAO,CAAC,gBAAgB;aAC7C;YACD,QAAQ,EAAE;gBACR,YAAY,EAAE,CAAC,MAAM,CAAC;gBACtB,WAAW,EAAE,oBAAoB;aAClC;SACF,CAAA;QAED,OAAO,CAAC,oBAAoB,CAAC,GAAG;YAC9B,QAAQ,EAAE,SAAS;YACnB,KAAK,EAAE,KAAK;YACZ,QAAQ,EAAE;gBACR,YAAY,EAAE,CAAC,MAAM,CAAC;gBACtB,WAAW,EACT,2DAA2D;aAC9D;SACF,CAAA;QAED,IACE,CAAE,oBAAoB,EAAE,OAAO,EAAE,OAAyC;YACxE,EAAE,cAAc,EAClB,CAAC;YACD,OAAO,GAAG;gBACR,OAAO,EAAE;oBACP,cAAc,EAAE,oCAAoC;iBACrD;aACF,CAAA;QACH,CAAC;IACH,CAAC;IAED,OAAO;QACL,QAAQ,EAAE;YACR,CAAC,WAAW,CAAC,EAAE;gBACb,OAAO;gBACP,OAAO;aACR;SACF;KACF,CAAA;AACH,CAAC;AAED,oDAAoD;AAA3C,sGAAA,UAAU,OAAA;AACnB,0CAAmD;AAA1C,qGAAA,cAAc,OAAA"}
|
|
@@ -7,17 +7,8 @@ const { promisify } = require('util')
|
|
|
7
7
|
|
|
8
8
|
const execAsync = promisify(exec)
|
|
9
9
|
|
|
10
|
-
// Configuration
|
|
11
|
-
const NX_CORE_VERSION = '
|
|
12
|
-
const NX_VERSION = '22.0.2' // e.g. '21.3.11'
|
|
13
|
-
const CHANGELOG_MODE = 'combined' // 'combined' | 'raw'
|
|
14
|
-
|
|
15
|
-
// Read optional Jira ticket URL from env only
|
|
16
|
-
const JIRA_TICKET_URL = undefined
|
|
17
|
-
|
|
18
|
-
// Collect PR URLs created during this run
|
|
19
|
-
const CREATED_PR_URLS = []
|
|
20
|
-
|
|
10
|
+
// Configuration
|
|
11
|
+
const NX_CORE_VERSION = '4.60.1'
|
|
21
12
|
const REPOSITORIES = [
|
|
22
13
|
'authorization',
|
|
23
14
|
'company-lifecycle',
|
|
@@ -31,7 +22,6 @@ const REPOSITORIES = [
|
|
|
31
22
|
'jetlang',
|
|
32
23
|
'organization-structure',
|
|
33
24
|
'payfit-domains',
|
|
34
|
-
'payroll',
|
|
35
25
|
'talent-management',
|
|
36
26
|
'time-absences',
|
|
37
27
|
]
|
|
@@ -78,208 +68,117 @@ async function run(command, cwd = process.cwd()) {
|
|
|
78
68
|
}
|
|
79
69
|
}
|
|
80
70
|
|
|
81
|
-
// Check if
|
|
82
|
-
async function
|
|
71
|
+
// Check if package.json exists and needs update
|
|
72
|
+
async function needsUpdate(repoPath) {
|
|
83
73
|
try {
|
|
84
74
|
const packageJsonPath = path.join(repoPath, 'package.json')
|
|
85
75
|
const packageJson = JSON.parse(await fs.readFile(packageJsonPath, 'utf8'))
|
|
86
76
|
const currentVersion = packageJson.devDependencies?.['@payfit/nx-core']
|
|
87
77
|
|
|
88
78
|
if (!currentVersion) {
|
|
89
|
-
console.log(
|
|
79
|
+
console.log(` โน @payfit/nx-core not found in devDependencies`)
|
|
90
80
|
return { needsUpdate: false, currentVersion: null }
|
|
91
81
|
}
|
|
92
82
|
|
|
93
83
|
if (compareVersions(currentVersion, NX_CORE_VERSION) === 0) {
|
|
94
|
-
console.log(
|
|
95
|
-
return { needsUpdate: false, currentVersion }
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
console.log(
|
|
99
|
-
`๐ฆ Current version: ${currentVersion}, target: ${NX_CORE_VERSION}`,
|
|
100
|
-
)
|
|
101
|
-
return { needsUpdate: true, currentVersion }
|
|
102
|
-
} catch (error) {
|
|
103
|
-
console.error(`โ Could not read package.json: ${error.message}`)
|
|
104
|
-
return { needsUpdate: false, currentVersion: null }
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
// Check if Nx in package.json needs update
|
|
109
|
-
async function needsNxUpdate(repoPath) {
|
|
110
|
-
if (!NX_VERSION) {
|
|
111
|
-
return { needsUpdate: false, currentVersion: null }
|
|
112
|
-
}
|
|
113
|
-
try {
|
|
114
|
-
const packageJsonPath = path.join(repoPath, 'package.json')
|
|
115
|
-
const packageJson = JSON.parse(await fs.readFile(packageJsonPath, 'utf8'))
|
|
116
|
-
const currentVersion =
|
|
117
|
-
packageJson.devDependencies?.['nx'] ?? packageJson.dependencies?.['nx']
|
|
118
|
-
|
|
119
|
-
if (!currentVersion) {
|
|
120
|
-
console.log(`โน nx not found in package.json`)
|
|
121
|
-
return { needsUpdate: false, currentVersion: null }
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
if (compareVersions(currentVersion, NX_VERSION) === 0) {
|
|
125
|
-
console.log(`โน Nx already on version ${NX_VERSION}`)
|
|
84
|
+
console.log(` โน Already on version ${NX_CORE_VERSION}`)
|
|
126
85
|
return { needsUpdate: false, currentVersion }
|
|
127
86
|
}
|
|
128
87
|
|
|
129
88
|
console.log(
|
|
130
|
-
|
|
89
|
+
` ๐ฆ Current version: ${currentVersion}, target: ${NX_CORE_VERSION}`,
|
|
131
90
|
)
|
|
132
91
|
return { needsUpdate: true, currentVersion }
|
|
133
92
|
} catch (error) {
|
|
134
|
-
console.error(
|
|
93
|
+
console.error(` โ Could not read package.json: ${error.message}`)
|
|
135
94
|
return { needsUpdate: false, currentVersion: null }
|
|
136
95
|
}
|
|
137
96
|
}
|
|
138
97
|
|
|
139
98
|
// Process a single repository
|
|
140
99
|
async function processRepo(repoName) {
|
|
141
|
-
console.log(
|
|
100
|
+
console.log(`\n๐ Processing ${repoName}`)
|
|
142
101
|
|
|
143
102
|
const repoPath = path.join(WORK_DIR, repoName)
|
|
144
103
|
|
|
145
104
|
try {
|
|
146
105
|
// Clone repo
|
|
147
|
-
console.log(
|
|
106
|
+
console.log(` ๐ฅ Cloning repository...`)
|
|
148
107
|
await run(
|
|
149
108
|
`git clone https://github.com/PayFit/${repoName}.git ${repoPath}`,
|
|
150
109
|
WORK_DIR,
|
|
151
110
|
)
|
|
152
111
|
|
|
153
|
-
// Check if
|
|
154
|
-
const
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
])
|
|
158
|
-
if (!nxCoreUpdateInfo.needsUpdate && !nxUpdateInfo.needsUpdate) {
|
|
159
|
-
console.log(`โญ๏ธ Skipping ${repoName} - no update needed`)
|
|
112
|
+
// Check if update needed
|
|
113
|
+
const updateInfo = await needsUpdate(repoPath)
|
|
114
|
+
if (!updateInfo.needsUpdate) {
|
|
115
|
+
console.log(` โญ๏ธ Skipping ${repoName} - no update needed`)
|
|
160
116
|
return
|
|
161
117
|
}
|
|
162
118
|
|
|
163
|
-
// Get changelogs between current and target version
|
|
164
|
-
const releaseNotes =
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
)
|
|
169
|
-
: ''
|
|
119
|
+
// Get changelogs between current and target version
|
|
120
|
+
const releaseNotes = await getChangelogBetweenVersions(
|
|
121
|
+
updateInfo.currentVersion,
|
|
122
|
+
NX_CORE_VERSION,
|
|
123
|
+
)
|
|
170
124
|
|
|
171
125
|
// Create branch
|
|
172
|
-
const
|
|
173
|
-
|
|
174
|
-
branchNameParts.push(`nx-core-v${NX_CORE_VERSION}`)
|
|
175
|
-
if (nxUpdateInfo.needsUpdate) branchNameParts.push(`nx-v${NX_VERSION}`)
|
|
176
|
-
const branchName = branchNameParts.join('-') || `nx-maintenance`
|
|
177
|
-
console.log(`๐ฟ Creating branch ${branchName}`)
|
|
126
|
+
const branchName = `nx-core-v${NX_CORE_VERSION}`
|
|
127
|
+
console.log(` ๐ฟ Creating branch ${branchName}`)
|
|
178
128
|
await run('git checkout main', repoPath)
|
|
179
129
|
await run(`git checkout -b ${branchName}`, repoPath)
|
|
180
130
|
|
|
181
131
|
// Install dependencies and migrate
|
|
182
|
-
console.log(
|
|
132
|
+
console.log(` ๐ฆ Installing dependencies...`)
|
|
183
133
|
await run('yarn', repoPath)
|
|
184
134
|
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
console.log(`๐ Planning Nx migration to version ${NX_VERSION}...`)
|
|
188
|
-
await run(`yarn nx migrate 'nx@${NX_VERSION}'`, repoPath)
|
|
189
|
-
}
|
|
190
|
-
if (nxCoreUpdateInfo.needsUpdate) {
|
|
191
|
-
console.log(
|
|
192
|
-
`๐ Planning nx-core migration to version ${NX_CORE_VERSION}...`,
|
|
193
|
-
)
|
|
194
|
-
await run(
|
|
195
|
-
`yarn nx migrate '@payfit/nx-core@${NX_CORE_VERSION}'`,
|
|
196
|
-
repoPath,
|
|
197
|
-
)
|
|
198
|
-
}
|
|
135
|
+
console.log(` ๐ Migrating nx-core to version ${NX_CORE_VERSION}...`)
|
|
136
|
+
await run(`yarn nx migrate '@payfit/nx-core@${NX_CORE_VERSION}'`, repoPath)
|
|
199
137
|
|
|
200
|
-
console.log(
|
|
138
|
+
console.log(` ๐ฆ Installing dependencies after migration...`)
|
|
201
139
|
await run('yarn', repoPath)
|
|
202
140
|
|
|
203
|
-
console.log(
|
|
141
|
+
console.log(` ๐ฆ Run migrations...`)
|
|
204
142
|
await run(`yarn nx migrate --run-migrations --ifExists`, repoPath)
|
|
205
143
|
|
|
206
|
-
// If targeting Nx >= 22, ensure nx.json release.version.updateDependents = "auto"
|
|
207
|
-
if (nxUpdateInfo.needsUpdate && NX_VERSION) {
|
|
208
|
-
const major = parseInt(extractVersion(NX_VERSION).split('.')[0], 10) || 0
|
|
209
|
-
if (major >= 22) {
|
|
210
|
-
console.log(
|
|
211
|
-
`๐ง Ensuring nx.json has release.version.updateDependents = "auto" for Nx >= 22...`,
|
|
212
|
-
)
|
|
213
|
-
const nxJsonChanged = await ensureUpdateDependentsAuto(repoPath)
|
|
214
|
-
if (nxJsonChanged) {
|
|
215
|
-
console.log('๐งน Formatting workspace (npx nx format)...')
|
|
216
|
-
await run('npx nx format', repoPath)
|
|
217
|
-
}
|
|
218
|
-
}
|
|
219
|
-
}
|
|
220
|
-
|
|
221
144
|
// Stage, commit and push
|
|
222
|
-
console.log(
|
|
145
|
+
console.log(` ๐ Staging and committing changes...`)
|
|
223
146
|
await run('git add .', repoPath)
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
}
|
|
230
|
-
if (nxCoreUpdateInfo.needsUpdate) {
|
|
231
|
-
commitParts.push(
|
|
232
|
-
`chore(nx-core): update nx-core from ${nxCoreUpdateInfo.currentVersion} to ${NX_CORE_VERSION}`,
|
|
233
|
-
)
|
|
234
|
-
}
|
|
235
|
-
const commitMessage = commitParts.join('')
|
|
236
|
-
await run(`git commit -m ${JSON.stringify(commitMessage)}`, repoPath)
|
|
237
|
-
await run(`git push -q origin ${branchName}`, repoPath)
|
|
147
|
+
await run(
|
|
148
|
+
`git commit -m "chore(nx-core): update nx-core from ${updateInfo.currentVersion} to ${NX_CORE_VERSION}"`,
|
|
149
|
+
repoPath,
|
|
150
|
+
)
|
|
151
|
+
await run(`git push origin ${branchName}`, repoPath)
|
|
238
152
|
|
|
239
153
|
// Create PR if it doesn't exist
|
|
240
|
-
console.log(
|
|
154
|
+
console.log(` ๐ Checking for existing pull requests...`)
|
|
241
155
|
const existingPRs = await run(
|
|
242
156
|
`gh pr list --repo PayFit/${repoName} --head ${branchName} --json number`,
|
|
243
157
|
)
|
|
244
158
|
if (JSON.parse(existingPRs).length === 0) {
|
|
245
|
-
console.log(
|
|
159
|
+
console.log(` ๐ Creating pull request...`)
|
|
246
160
|
|
|
247
161
|
// Create PR body with release notes
|
|
248
|
-
const
|
|
249
|
-
if (nxUpdateInfo.needsUpdate) prTitleParts.push(`Nx to v${NX_VERSION}`)
|
|
250
|
-
if (nxCoreUpdateInfo.needsUpdate)
|
|
251
|
-
prTitleParts.push(`@payfit/nx-core to v${NX_CORE_VERSION}`)
|
|
252
|
-
const prTitle = `chore(nx): update ${prTitleParts.join(' and ')}`
|
|
253
|
-
|
|
254
|
-
let prBody = ''
|
|
255
|
-
if (nxUpdateInfo.needsUpdate) {
|
|
256
|
-
prBody += `Update Nx from ${nxUpdateInfo.currentVersion} to ${NX_VERSION}\n\n`
|
|
257
|
-
}
|
|
258
|
-
if (nxCoreUpdateInfo.needsUpdate) {
|
|
259
|
-
prBody += `Update @payfit/nx-core from ${nxCoreUpdateInfo.currentVersion} to ${NX_CORE_VERSION}\n\n`
|
|
260
|
-
prBody += `## Changelog\n\n${releaseNotes}\n`
|
|
261
|
-
}
|
|
162
|
+
const prBody = `Update @payfit/nx-core from ${updateInfo.currentVersion} to ${NX_CORE_VERSION}
|
|
262
163
|
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
164
|
+
## Changelog
|
|
165
|
+
|
|
166
|
+
${releaseNotes}
|
|
167
|
+
`
|
|
266
168
|
|
|
267
169
|
// Write PR body to a file to preserve formatting (newlines, markdown)
|
|
268
170
|
const prBodyPath = path.join(repoPath, 'nx-core-pr-body.md')
|
|
269
171
|
await fs.writeFile(prBodyPath, prBody, 'utf8')
|
|
270
172
|
|
|
271
|
-
|
|
272
|
-
`gh pr create --repo PayFit/${repoName} --title ${
|
|
273
|
-
prTitle,
|
|
274
|
-
)} --body-file "${prBodyPath}" --head ${branchName}`,
|
|
173
|
+
await run(
|
|
174
|
+
`gh pr create --repo PayFit/${repoName} --title "chore(nx-core): update nx-core from ${updateInfo.currentVersion} to ${NX_CORE_VERSION}" --body-file "${prBodyPath}" --head ${branchName}`,
|
|
275
175
|
)
|
|
276
|
-
|
|
277
|
-
console.log(`โ
Successfully created PR for ${repoName}: ${prUrl}`)
|
|
176
|
+
console.log(` โ
Successfully created PR for ${repoName}`)
|
|
278
177
|
} else {
|
|
279
|
-
console.log(
|
|
178
|
+
console.log(` โน๏ธ PR already exists for ${repoName}`)
|
|
280
179
|
}
|
|
281
180
|
} catch (error) {
|
|
282
|
-
console.error(
|
|
181
|
+
console.error(` โ Failed to process ${repoName}: ${error.message}`)
|
|
283
182
|
throw error
|
|
284
183
|
}
|
|
285
184
|
}
|
|
@@ -288,7 +187,7 @@ async function processRepo(repoName) {
|
|
|
288
187
|
async function getChangelogBetweenVersions(currentVersion, targetVersion) {
|
|
289
188
|
try {
|
|
290
189
|
console.log(
|
|
291
|
-
|
|
190
|
+
` ๐ Fetching changelogs from ${currentVersion} to ${targetVersion}...`,
|
|
292
191
|
)
|
|
293
192
|
|
|
294
193
|
// Get only nx-core releases from the repository, filtered at CLI level
|
|
@@ -323,178 +222,36 @@ async function getChangelogBetweenVersions(currentVersion, targetVersion) {
|
|
|
323
222
|
|
|
324
223
|
// Fetch detailed release notes for each relevant release
|
|
325
224
|
console.log(
|
|
326
|
-
|
|
225
|
+
` ๐ Fetching detailed release notes for ${relevantReleases.length} release(s)...`,
|
|
327
226
|
)
|
|
328
|
-
|
|
227
|
+
let changelog = ''
|
|
329
228
|
for (const release of relevantReleases) {
|
|
330
229
|
try {
|
|
331
230
|
const releaseBody = await run(
|
|
332
231
|
`gh release view ${release.tagName} --repo PayFit/nx-common-packages --json body --jq '.body'`,
|
|
333
232
|
)
|
|
334
233
|
const body = releaseBody.replace(/^"|"$/g, '') // Remove surrounding quotes from jq output
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
body: body || 'No release notes available.',
|
|
338
|
-
})
|
|
234
|
+
changelog += `### ${release.tagName}\n\n`
|
|
235
|
+
changelog += `${body || 'No release notes available.'}\n\n`
|
|
339
236
|
} catch (error) {
|
|
340
237
|
console.log(
|
|
341
|
-
`
|
|
238
|
+
` โ ๏ธ Could not fetch release notes for ${release.tagName}: ${error.message}`,
|
|
342
239
|
)
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
body: 'Release notes could not be retrieved.',
|
|
346
|
-
})
|
|
240
|
+
changelog += `### ${release.tagName}\n\n`
|
|
241
|
+
changelog += `Release notes could not be retrieved.\n\n`
|
|
347
242
|
}
|
|
348
243
|
}
|
|
349
244
|
|
|
350
245
|
console.log(
|
|
351
|
-
|
|
246
|
+
` โ
Retrieved ${relevantReleases.length} nx-core release(s) between versions`,
|
|
352
247
|
)
|
|
353
|
-
|
|
354
|
-
if (CHANGELOG_MODE === 'raw') {
|
|
355
|
-
// Plain concatenation with clear spacing
|
|
356
|
-
let raw = ''
|
|
357
|
-
for (const entry of releaseEntries) {
|
|
358
|
-
raw += `### ${entry.tag}\n\n${entry.body}\n\n`
|
|
359
|
-
}
|
|
360
|
-
return raw.trim()
|
|
361
|
-
}
|
|
362
|
-
|
|
363
|
-
// Combined/aggregated changelog
|
|
364
|
-
return buildCombinedChangelog(releaseEntries)
|
|
248
|
+
return changelog.trim()
|
|
365
249
|
} catch (error) {
|
|
366
|
-
console.log(
|
|
250
|
+
console.log(` โ ๏ธ Could not fetch release notes: ${error.message}`)
|
|
367
251
|
return `Release notes could not be retrieved between ${currentVersion} and ${targetVersion}.`
|
|
368
252
|
}
|
|
369
253
|
}
|
|
370
254
|
|
|
371
|
-
// Normalize a section heading to a canonical bucket
|
|
372
|
-
function normalizeSection(title) {
|
|
373
|
-
const t = String(title).trim().toLowerCase()
|
|
374
|
-
if (/breaking|migration/.test(t)) return 'Breaking Changes'
|
|
375
|
-
if (/feature/.test(t)) return 'Features'
|
|
376
|
-
if (/fix|bug/.test(t)) return 'Bug Fixes'
|
|
377
|
-
if (/perf|performance/.test(t)) return 'Performance'
|
|
378
|
-
if (/refactor/.test(t)) return 'Refactor'
|
|
379
|
-
if (/doc/.test(t)) return 'Docs'
|
|
380
|
-
if (/chore/.test(t)) return 'Chore'
|
|
381
|
-
if (/revert/.test(t)) return 'Reverts'
|
|
382
|
-
return null
|
|
383
|
-
}
|
|
384
|
-
|
|
385
|
-
// Build a combined changelog from multiple release markdown bodies
|
|
386
|
-
function buildCombinedChangelog(entries) {
|
|
387
|
-
const sectionOrder = [
|
|
388
|
-
'Breaking Changes',
|
|
389
|
-
'Features',
|
|
390
|
-
'Bug Fixes',
|
|
391
|
-
'Performance',
|
|
392
|
-
'Refactor',
|
|
393
|
-
'Docs',
|
|
394
|
-
'Chore',
|
|
395
|
-
'Reverts',
|
|
396
|
-
'Other Changes',
|
|
397
|
-
]
|
|
398
|
-
|
|
399
|
-
const aggregated = new Map()
|
|
400
|
-
for (const key of sectionOrder) aggregated.set(key, [])
|
|
401
|
-
|
|
402
|
-
for (const { tag, body } of entries) {
|
|
403
|
-
const lines = String(body).split('\n')
|
|
404
|
-
let current = null
|
|
405
|
-
let inCodeBlock = false
|
|
406
|
-
let pendingBullet = null
|
|
407
|
-
|
|
408
|
-
const flushPending = () => {
|
|
409
|
-
if (pendingBullet) {
|
|
410
|
-
const bucket = current || 'Other Changes'
|
|
411
|
-
aggregated.get(bucket).push(pendingBullet.trim())
|
|
412
|
-
pendingBullet = null
|
|
413
|
-
}
|
|
414
|
-
}
|
|
415
|
-
|
|
416
|
-
for (const raw of lines) {
|
|
417
|
-
const line = raw.replace(/\r$/, '')
|
|
418
|
-
|
|
419
|
-
// Handle fenced code blocks so we don't ingest code as bullets
|
|
420
|
-
if (/^```/.test(line.trim())) {
|
|
421
|
-
inCodeBlock = !inCodeBlock
|
|
422
|
-
continue
|
|
423
|
-
}
|
|
424
|
-
if (inCodeBlock) continue
|
|
425
|
-
|
|
426
|
-
// Headings like ##, ###, ####
|
|
427
|
-
const headingMatch = line.match(/^#{2,4}\s+(.+?)\s*$/)
|
|
428
|
-
if (headingMatch) {
|
|
429
|
-
flushPending()
|
|
430
|
-
const canonical = normalizeSection(headingMatch[1])
|
|
431
|
-
current = canonical
|
|
432
|
-
continue
|
|
433
|
-
}
|
|
434
|
-
|
|
435
|
-
// Bullet points
|
|
436
|
-
const bulletMatch = line.match(/^\s*[-*]\s+(.+)$/)
|
|
437
|
-
if (bulletMatch) {
|
|
438
|
-
// Flush previous bullet before starting new
|
|
439
|
-
flushPending()
|
|
440
|
-
pendingBullet = bulletMatch[1]
|
|
441
|
-
continue
|
|
442
|
-
}
|
|
443
|
-
|
|
444
|
-
// Continuation lines for multi-line bullets
|
|
445
|
-
if (pendingBullet && line.trim().length > 0) {
|
|
446
|
-
pendingBullet += ` ${line.trim()}`
|
|
447
|
-
} else if (!pendingBullet && current && line.trim().length > 0) {
|
|
448
|
-
// Non-bullet content under a recognized section
|
|
449
|
-
aggregated.get(current).push(line.trim())
|
|
450
|
-
}
|
|
451
|
-
}
|
|
452
|
-
flushPending()
|
|
453
|
-
}
|
|
454
|
-
|
|
455
|
-
// Build markdown
|
|
456
|
-
let out = ''
|
|
457
|
-
for (const key of sectionOrder) {
|
|
458
|
-
if (key === 'Other Changes') continue // discard Other Changes entirely
|
|
459
|
-
const items = aggregated.get(key)
|
|
460
|
-
if (!items || items.length === 0) continue
|
|
461
|
-
out += `#### ${key}\n\n`
|
|
462
|
-
for (const item of items) {
|
|
463
|
-
out += `- ${item}\n`
|
|
464
|
-
}
|
|
465
|
-
out += `\n`
|
|
466
|
-
}
|
|
467
|
-
return out.trim()
|
|
468
|
-
}
|
|
469
|
-
|
|
470
|
-
// Ensure nx.json has release.version.updateDependents = "auto" for Nx >= 22
|
|
471
|
-
async function ensureUpdateDependentsAuto(repoPath) {
|
|
472
|
-
const nxJsonPath = path.join(repoPath, 'nx.json')
|
|
473
|
-
try {
|
|
474
|
-
const content = await fs.readFile(nxJsonPath, 'utf8')
|
|
475
|
-
const data = JSON.parse(content)
|
|
476
|
-
if (!data.release) data.release = {}
|
|
477
|
-
if (!data.release.version) data.release.version = {}
|
|
478
|
-
if (data.release.version.updateDependents === undefined) {
|
|
479
|
-
data.release.version.updateDependents = 'auto'
|
|
480
|
-
await fs.writeFile(
|
|
481
|
-
nxJsonPath,
|
|
482
|
-
JSON.stringify(data, null, 2) + '\n',
|
|
483
|
-
'utf8',
|
|
484
|
-
)
|
|
485
|
-
console.log(
|
|
486
|
-
'๐งฉ Set release.version.updateDependents to "auto" in nx.json',
|
|
487
|
-
)
|
|
488
|
-
return true
|
|
489
|
-
}
|
|
490
|
-
console.log('โน nx.json already has release.version.updateDependents')
|
|
491
|
-
return false
|
|
492
|
-
} catch (error) {
|
|
493
|
-
console.log(`โ ๏ธ Skipped nx.json update: ${error.message}`)
|
|
494
|
-
return false
|
|
495
|
-
}
|
|
496
|
-
}
|
|
497
|
-
|
|
498
255
|
// Check if gh CLI is installed and user is authenticated
|
|
499
256
|
async function checkGhCli() {
|
|
500
257
|
try {
|
|
@@ -517,9 +274,7 @@ async function checkGhCli() {
|
|
|
517
274
|
|
|
518
275
|
// Main function
|
|
519
276
|
async function main() {
|
|
520
|
-
console.log(
|
|
521
|
-
`๐ฏ nx-core Updater - nx-core target ${NX_CORE_VERSION}${NX_VERSION ? `, Nx target ${NX_VERSION}` : ''}`,
|
|
522
|
-
)
|
|
277
|
+
console.log(`๐ฏ nx-core Updater - version ${NX_CORE_VERSION}`)
|
|
523
278
|
console.log(`๐ Processing ${REPOSITORIES.length} repositories`)
|
|
524
279
|
|
|
525
280
|
try {
|
|
@@ -534,25 +289,19 @@ async function main() {
|
|
|
534
289
|
await fs.mkdir(WORK_DIR, { recursive: true })
|
|
535
290
|
|
|
536
291
|
// Process repositories sequentially
|
|
537
|
-
console.log(
|
|
292
|
+
console.log(`\n๐ Processing repositories...`)
|
|
538
293
|
for (const repo of REPOSITORIES) {
|
|
539
294
|
await processRepo(repo)
|
|
540
295
|
}
|
|
541
296
|
|
|
542
297
|
// Cleanup
|
|
543
|
-
console.log(
|
|
298
|
+
console.log(`\n๐งน Cleaning up work directory...`)
|
|
544
299
|
await fs.rm(WORK_DIR, { recursive: true, force: true }).catch(() => {
|
|
545
300
|
// ignore error if directory does not exist
|
|
546
301
|
})
|
|
547
|
-
|
|
548
|
-
console.log('๐ Created PRs:')
|
|
549
|
-
for (const url of CREATED_PR_URLS) {
|
|
550
|
-
console.log(`- ${url}`)
|
|
551
|
-
}
|
|
552
|
-
}
|
|
553
|
-
console.log('๐ Done!')
|
|
302
|
+
console.log('\n๐ Done!')
|
|
554
303
|
} catch (error) {
|
|
555
|
-
console.error(
|
|
304
|
+
console.error(`\n๐ฅ Script failed: ${error.message}`)
|
|
556
305
|
process.exit(1)
|
|
557
306
|
}
|
|
558
307
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function getEnvVar(name: string): string;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getEnvVar = getEnvVar;
|
|
4
|
+
function getEnvVar(name) {
|
|
5
|
+
const value = process.env[name];
|
|
6
|
+
if (!value) {
|
|
7
|
+
throw new Error(`Missing env var ${name}`);
|
|
8
|
+
}
|
|
9
|
+
return value;
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=environment.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"environment.js","sourceRoot":"","sources":["../../../../src/utils/common/environment.ts"],"names":[],"mappings":";;AAAA,8BAMC;AAND,SAAgB,SAAS,CAAC,IAAY;IACpC,MAAM,KAAK,GAAG,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAA;IAC/B,IAAI,CAAC,KAAK,EAAE,CAAC;QACX,MAAM,IAAI,KAAK,CAAC,mBAAmB,IAAI,EAAE,CAAC,CAAA;IAC5C,CAAC;IACD,OAAO,KAAK,CAAA;AACd,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.OctokitAuth = OctokitAuth;
|
|
4
|
+
const auth_app_1 = require("@octokit/auth-app");
|
|
5
|
+
const rest_1 = require("@octokit/rest");
|
|
6
|
+
const environment_1 = require("./environment");
|
|
7
|
+
function OctokitAuth() {
|
|
8
|
+
if ((0, environment_1.getEnvVar)('GITHUB_TOKEN')) {
|
|
9
|
+
return new rest_1.Octokit({ auth: process.env.GITHUB_TOKEN });
|
|
10
|
+
}
|
|
11
|
+
else {
|
|
12
|
+
return new rest_1.Octokit({
|
|
13
|
+
authStrategy: auth_app_1.createAppAuth,
|
|
14
|
+
auth: {
|
|
15
|
+
appId: (0, environment_1.getEnvVar)('GITHUB_APP_ID'),
|
|
16
|
+
privateKey: (0, environment_1.getEnvVar)('GITHUB_PRIVATE_KEY'),
|
|
17
|
+
installationId: (0, environment_1.getEnvVar)('GITHUB_INSTALLATION_ID'),
|
|
18
|
+
},
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=octokit.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"octokit.js","sourceRoot":"","sources":["../../../../src/utils/common/octokit.ts"],"names":[],"mappings":";;AAKA,kCAaC;AAlBD,gDAAiD;AACjD,wCAAuC;AAEvC,+CAAyC;AAEzC,SAAgB,WAAW;IACzB,IAAI,IAAA,uBAAS,EAAC,cAAc,CAAC,EAAE,CAAC;QAC9B,OAAO,IAAI,cAAO,CAAC,EAAE,IAAI,EAAE,OAAO,CAAC,GAAG,CAAC,YAAY,EAAE,CAAC,CAAA;IACxD,CAAC;SAAM,CAAC;QACN,OAAO,IAAI,cAAO,CAAC;YACjB,YAAY,EAAE,wBAAa;YAC3B,IAAI,EAAE;gBACJ,KAAK,EAAE,IAAA,uBAAS,EAAC,eAAe,CAAC;gBACjC,UAAU,EAAE,IAAA,uBAAS,EAAC,oBAAoB,CAAC;gBAC3C,cAAc,EAAE,IAAA,uBAAS,EAAC,wBAAwB,CAAC;aACpD;SACF,CAAC,CAAA;IACJ,CAAC;AACH,CAAC"}
|
package/executors.json
CHANGED
|
@@ -19,6 +19,11 @@
|
|
|
19
19
|
"implementation": "./dist/src/executors/preview-deploy/executor",
|
|
20
20
|
"schema": "./dist/src/executors/preview-deploy/schema.json",
|
|
21
21
|
"description": "Custom preview-deploy executor"
|
|
22
|
+
},
|
|
23
|
+
"preview-labels": {
|
|
24
|
+
"implementation": "./dist/src/executors/preview-labels/executor",
|
|
25
|
+
"schema": "./dist/src/executors/preview-labels/schema.json",
|
|
26
|
+
"description": "Manage GitHub preview labels for applications"
|
|
22
27
|
}
|
|
23
28
|
}
|
|
24
29
|
}
|