@waron97/prbot 2.0.0 → 2.2.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.
@@ -1,144 +1,147 @@
1
- import { readFileSync, existsSync, mkdirSync, writeFileSync, appendFileSync } from "fs";
2
- import path from "path";
3
- import inquirer from "inquirer";
4
- import { CONFIG_DIR, CONFIG_FILE, COMPLETION_SCRIPT } from "../config.js";
1
+ import { appendFileSync, existsSync, mkdirSync, readFileSync, writeFileSync } from 'fs';
2
+ import path from 'path';
3
+ import inquirer from 'inquirer';
4
+ import { COMPLETION_SCRIPT, CONFIG_DIR, CONFIG_FILE } from '../config.js';
5
5
 
6
6
  async function init(completion) {
7
- if (!existsSync(CONFIG_DIR)) {
8
- mkdirSync(CONFIG_DIR, { recursive: true });
9
- }
7
+ if (!existsSync(CONFIG_DIR)) {
8
+ mkdirSync(CONFIG_DIR, { recursive: true });
9
+ }
10
10
 
11
- const existing = existsSync(CONFIG_FILE)
12
- ? Object.fromEntries(
13
- readFileSync(CONFIG_FILE, "utf-8")
14
- .split("\n")
15
- .flatMap((line) => {
16
- const m = line.match(/^([A-Z_]+)=(.*)$/);
17
- return m ? [[m[1], m[2]]] : [];
18
- }),
19
- )
20
- : {};
11
+ const existing = existsSync(CONFIG_FILE)
12
+ ? Object.fromEntries(
13
+ readFileSync(CONFIG_FILE, 'utf-8')
14
+ .split('\n')
15
+ .flatMap((line) => {
16
+ const m = line.match(/^([A-Z_]+)=(.*)$/);
17
+ return m ? [[m[1], m[2]]] : [];
18
+ })
19
+ )
20
+ : {};
21
21
 
22
- const answers = await inquirer.prompt([
23
- {
24
- type: "input",
25
- name: "ADDONS_PATH",
26
- message: "Addons path:",
27
- default: existing.ADDONS_PATH ?? "~/codebase/sorgenia/addons",
28
- },
29
- {
30
- type: "input",
31
- name: "KC_URL",
32
- message: "Keycloak URL:",
33
- default: existing.KC_URL ?? "",
34
- },
35
- {
36
- type: "input",
37
- name: "KC_USER",
38
- message: "Keycloak user:",
39
- default: existing.KC_USER ?? "",
40
- },
41
- {
42
- type: "password",
43
- name: "KC_PASSWORD",
44
- message: "Keycloak password:",
45
- default: existing.KC_PASSWORD ?? "",
46
- mask: "*",
47
- },
48
- {
49
- type: "input",
50
- name: "KC_ID",
51
- message: "Keycloak client ID:",
52
- default: existing.KC_ID ?? "",
53
- },
54
- {
55
- type: "input",
56
- name: "KC_SECRET",
57
- message: "Keycloak client secret:",
58
- default: existing.KC_SECRET ?? "",
59
- },
60
- {
61
- type: "input",
62
- name: "RIP_URL",
63
- message: "RIP URL:",
64
- default: existing.RIP_URL ?? "",
65
- },
66
- {
67
- type: "input",
68
- name: "TRIDENT_URL",
69
- message: "Trident URL:",
70
- default: existing.TRIDENT_URL ?? "",
71
- },
72
- {
73
- type: "input",
74
- name: "TRIDENT_UID",
75
- message: "Trident UID:",
76
- default: existing.TRIDENT_UID ?? "",
77
- },
78
- {
79
- type: "input",
80
- name: "TRIDENT_TOKEN",
81
- message: "Trident token:",
82
- default: existing.TRIDENT_TOKEN ?? "",
83
- },
84
- {
85
- type: "input",
86
- name: "DEVOPS_TOKEN",
87
- message: "DevOps token:",
88
- default: existing.DEVOPS_TOKEN ?? "",
89
- },
90
- {
91
- type: "input",
92
- name: "DEVOPS_ORG",
93
- message: "DevOps org:",
94
- default: existing.DEVOPS_ORG ?? "",
95
- },
96
- {
97
- type: "input",
98
- name: "DEVOPS_PROJECT",
99
- message: "DevOps project:",
100
- default: existing.DEVOPS_PROJECT ?? "",
101
- },
102
- {
103
- type: "input",
104
- name: "DEVOPS_REPO",
105
- message: "DevOps repo:",
106
- default: existing.DEVOPS_REPO ?? "",
107
- },
108
- {
109
- type: "input",
110
- name: "TRIDENT_DB",
111
- message: "Trident DB name:",
112
- default: existing.TRIDENT_DB ?? "",
113
- },
114
- {
115
- type: "input",
116
- name: "AUTOPR_TARGET_BRANCH",
117
- message: "AutoPR target branch:",
118
- default: existing.AUTOPR_TARGET_BRANCH ?? "15.0-dev",
119
- },
120
- ]);
22
+ const answers = await inquirer.prompt([
23
+ {
24
+ type: 'input',
25
+ name: 'ADDONS_PATH',
26
+ message: 'Addons path:',
27
+ default: existing.ADDONS_PATH ?? '~/codebase/sorgenia/addons',
28
+ },
29
+ {
30
+ type: 'input',
31
+ name: 'KC_URL',
32
+ message: 'Keycloak URL:',
33
+ default: existing.KC_URL ?? '',
34
+ },
35
+ {
36
+ type: 'input',
37
+ name: 'KC_USER',
38
+ message: 'Keycloak user:',
39
+ default: existing.KC_USER ?? '',
40
+ },
41
+ {
42
+ type: 'password',
43
+ name: 'KC_PASSWORD',
44
+ message: `Keycloak password${existing.KC_PASSWORD ? ' (leave blank to keep existing)' : ''}:`,
45
+ mask: '*',
46
+ },
47
+ {
48
+ type: 'input',
49
+ name: 'KC_ID',
50
+ message: 'Keycloak client ID:',
51
+ default: existing.KC_ID ?? '',
52
+ },
53
+ {
54
+ type: 'input',
55
+ name: 'KC_SECRET',
56
+ message: 'Keycloak client secret:',
57
+ default: existing.KC_SECRET ?? '',
58
+ },
59
+ {
60
+ type: 'input',
61
+ name: 'RIP_URL',
62
+ message: 'RIP URL:',
63
+ default: existing.RIP_URL ?? '',
64
+ },
65
+ {
66
+ type: 'input',
67
+ name: 'TRIDENT_URL',
68
+ message: 'Trident URL:',
69
+ default: existing.TRIDENT_URL ?? '',
70
+ },
71
+ {
72
+ type: 'input',
73
+ name: 'TRIDENT_UID',
74
+ message: 'Trident UID:',
75
+ default: existing.TRIDENT_UID ?? '',
76
+ },
77
+ {
78
+ type: 'input',
79
+ name: 'TRIDENT_TOKEN',
80
+ message: 'Trident token:',
81
+ default: existing.TRIDENT_TOKEN ?? '',
82
+ },
83
+ {
84
+ type: 'input',
85
+ name: 'DEVOPS_TOKEN',
86
+ message: 'DevOps token:',
87
+ default: existing.DEVOPS_TOKEN ?? '',
88
+ },
89
+ {
90
+ type: 'input',
91
+ name: 'DEVOPS_ORG',
92
+ message: 'DevOps org:',
93
+ default: existing.DEVOPS_ORG ?? '',
94
+ },
95
+ {
96
+ type: 'input',
97
+ name: 'DEVOPS_PROJECT',
98
+ message: 'DevOps project:',
99
+ default: existing.DEVOPS_PROJECT ?? '',
100
+ },
101
+ {
102
+ type: 'input',
103
+ name: 'DEVOPS_REPO',
104
+ message: 'DevOps repo:',
105
+ default: existing.DEVOPS_REPO ?? '',
106
+ },
107
+ {
108
+ type: 'input',
109
+ name: 'TRIDENT_DB',
110
+ message: 'Trident DB name:',
111
+ default: existing.TRIDENT_DB ?? 'trident-agora',
112
+ },
113
+ {
114
+ type: 'input',
115
+ name: 'AUTOPR_TARGET_BRANCH',
116
+ message: 'AutoPR target branch:',
117
+ default: existing.AUTOPR_TARGET_BRANCH ?? '15.0-dev',
118
+ },
119
+ ]);
121
120
 
122
- writeFileSync(
123
- CONFIG_FILE,
124
- Object.entries(answers)
125
- .map(([k, v]) => `${k}=${v}`)
126
- .join("\n") + "\n",
127
- );
128
- console.log(`Config written to ${CONFIG_FILE}`);
121
+ if (!answers.KC_PASSWORD && existing.KC_PASSWORD) {
122
+ answers.KC_PASSWORD = existing.KC_PASSWORD;
123
+ }
129
124
 
130
- writeFileSync(COMPLETION_SCRIPT, completion.generateCompletionCode());
131
- console.log(`Completion script written to ${COMPLETION_SCRIPT}`);
125
+ writeFileSync(
126
+ CONFIG_FILE,
127
+ Object.entries(answers)
128
+ .map(([k, v]) => `${k}=${v}`)
129
+ .join('\n') + '\n'
130
+ );
131
+ console.log(`Config written to ${CONFIG_FILE}`);
132
132
 
133
- const rcFile = path.join(process.env.HOME || "", ".bashrc");
134
- const sourceLine = `source ${COMPLETION_SCRIPT}`;
135
- const rcContent = existsSync(rcFile) ? readFileSync(rcFile, "utf-8") : "";
136
- if (!rcContent.includes(sourceLine)) {
137
- appendFileSync(rcFile, `\n# prbot completion\n${sourceLine}\n`);
138
- console.log(`Registered completion in ${rcFile} run: source ~/.bashrc`);
139
- } else {
140
- console.log("Completion already registered in ~/.bashrc");
141
- }
133
+ writeFileSync(COMPLETION_SCRIPT, completion.generateCompletionCode());
134
+ console.log(`Completion script written to ${COMPLETION_SCRIPT}`);
135
+
136
+ const rcFile = path.join(process.env.HOME || '', '.bashrc');
137
+ const sourceLine = `source ${COMPLETION_SCRIPT}`;
138
+ const rcContent = existsSync(rcFile) ? readFileSync(rcFile, 'utf-8') : '';
139
+ if (!rcContent.includes(sourceLine)) {
140
+ appendFileSync(rcFile, `\n# prbot completion\n${sourceLine}\n`);
141
+ console.log(`Registered completion in ${rcFile} — run: source ~/.bashrc`);
142
+ } else {
143
+ console.log('Completion already registered in ~/.bashrc');
144
+ }
142
145
  }
143
146
 
144
147
  export { init };
@@ -1,124 +1,119 @@
1
- import fetch from "node-fetch";
2
- import fs from "fs/promises";
3
- import path from "path";
4
- import { execFile } from "child_process";
5
- import { resolveAddonsPath } from "../lib/addons.js";
1
+ import { execFile } from 'child_process';
2
+ import fs from 'fs/promises';
3
+ import path from 'path';
4
+ import fetch from 'node-fetch';
5
+ import { resolveAddonsPath } from '../lib/addons.js';
6
6
 
7
7
  async function getToken() {
8
- const url = process.env.KC_URL;
9
- const payload = new URLSearchParams();
10
-
11
- payload.append("username", process.env.KC_USER);
12
- payload.append("password", process.env.KC_PASSWORD);
13
- payload.append("client_id", process.env.KC_ID);
14
- payload.append("client_secret", process.env.KC_SECRET);
15
- payload.append("grant_type", "password");
16
-
17
- const response = await fetch(url, {
18
- method: "POST",
19
- headers: {
20
- "Content-Type": "application/x-www-form-urlencoded",
21
- },
22
- body: payload.toString(),
23
- });
24
-
25
- const json = await response.json();
26
- return json.access_token;
8
+ const url = process.env.KC_URL;
9
+ const payload = new URLSearchParams();
10
+
11
+ payload.append('username', process.env.KC_USER);
12
+ payload.append('password', process.env.KC_PASSWORD);
13
+ payload.append('client_id', process.env.KC_ID);
14
+ payload.append('client_secret', process.env.KC_SECRET);
15
+ payload.append('grant_type', 'password');
16
+
17
+ const response = await fetch(url, {
18
+ method: 'POST',
19
+ headers: {
20
+ 'Content-Type': 'application/x-www-form-urlencoded',
21
+ },
22
+ body: payload.toString(),
23
+ });
24
+
25
+ const json = await response.json();
26
+ return json.access_token;
27
27
  }
28
28
 
29
29
  async function getFiles(module_name, token) {
30
- const url = `${process.env.RIP_URL}/ir.model/xml_prbot`;
31
- const body = JSON.stringify({ module_name });
32
- const headers = {
33
- Authorization: `Bearer ${token}`,
34
- "Content-Type": "application/json",
35
- };
36
-
37
- const response = await fetch(url, { method: "POST", body, headers });
38
- if (!response.ok) {
39
- throw new Error(await response.text());
40
- }
41
- return await response.json();
30
+ const url = `${process.env.RIP_URL}/ir.model/xml_prbot`;
31
+ const body = JSON.stringify({ module_name });
32
+ const headers = {
33
+ Authorization: `Bearer ${token}`,
34
+ 'Content-Type': 'application/json',
35
+ };
36
+
37
+ const response = await fetch(url, { method: 'POST', body, headers });
38
+ if (!response.ok) {
39
+ throw new Error(await response.text());
40
+ }
41
+ return await response.json();
42
42
  }
43
43
 
44
44
  async function main(module_name) {
45
- const token = await getToken();
46
- const files = await getFiles(module_name, token);
47
-
48
- let ADDONS_PATH = resolveAddonsPath(process.env.ADDONS_PATH);
49
-
50
- for (const file of files) {
51
- const buffer = Buffer.from(file.data, "base64");
52
- let content = buffer.toString();
53
- const lines = content.split("\n");
54
-
55
- const odooCloseIndex = lines.findIndex((l) => l.trim() === "</odoo>");
56
- if (odooCloseIndex !== -1 && odooCloseIndex < lines.length - 1) {
57
- const footer = lines.slice(odooCloseIndex + 1).join("\n");
58
- const skippedMatch = footer.match(/Skipped records:\s*(\d+)/);
59
- if (skippedMatch && parseInt(skippedMatch[1]) > 0) {
60
- throw new Error(
61
- `[${file.name}] Export contains skipped records:\n${footer.trim()}`,
45
+ const token = await getToken();
46
+ const files = await getFiles(module_name, token);
47
+
48
+ let ADDONS_PATH = resolveAddonsPath(process.env.ADDONS_PATH);
49
+
50
+ for (const file of files) {
51
+ const buffer = Buffer.from(file.data, 'base64');
52
+ let content = buffer.toString();
53
+ const lines = content.split('\n');
54
+
55
+ const odooCloseIndex = lines.findIndex((l) => l.trim() === '</odoo>');
56
+ if (odooCloseIndex !== -1 && odooCloseIndex < lines.length - 1) {
57
+ const footer = lines.slice(odooCloseIndex + 1).join('\n');
58
+ const skippedMatch = footer.match(/Skipped records:\s*(\d+)/);
59
+ if (skippedMatch && parseInt(skippedMatch[1]) > 0) {
60
+ throw new Error(
61
+ `[${file.name}] Export contains skipped records:\n${footer.trim()}`
62
+ );
63
+ }
64
+ const duplicatedMatch = footer.match(/Duplicated records:\s*(\d+)/);
65
+ if (duplicatedMatch && parseInt(duplicatedMatch[1]) > 0) {
66
+ throw new Error(
67
+ `[${file.name}] Export contains duplicated records:\n${footer.trim()}`
68
+ );
69
+ }
70
+ }
71
+
72
+ if (lines.length > 2) {
73
+ lines.splice(-2);
74
+ }
75
+ content = lines.join('\n');
76
+ content = content.replace(
77
+ /<field name="bpmn_diagram"><!\[CDATA\[[\s\S]*?\]\]><\/field>/g,
78
+ ''
62
79
  );
63
- }
64
- const duplicatedMatch = footer.match(/Duplicated records:\s*(\d+)/);
65
- if (duplicatedMatch && parseInt(duplicatedMatch[1]) > 0) {
66
- throw new Error(
67
- `[${file.name}] Export contains duplicated records:\n${footer.trim()}`,
68
- );
69
- }
70
- }
71
80
 
72
- if (lines.length > 2) {
73
- lines.splice(-2);
74
- }
75
- content = lines.join("\n");
76
- content = content.replace(
77
- /<field name="bpmn_diagram"><!\[CDATA\[[\s\S]*?\]\]><\/field>/g,
78
- "",
79
- );
80
-
81
- let destPath;
82
- if (file.name.includes("Relazioni mancanti")) {
83
- destPath = `${ADDONS_PATH}/config/${module_name}/data/workflow_missing_relations.xml`;
84
- } else {
85
- destPath = `${ADDONS_PATH}/config/${module_name}/data/workflow_configuration.xml`;
86
- }
81
+ let destPath;
82
+ if (file.name.includes('Relazioni mancanti')) {
83
+ destPath = `${ADDONS_PATH}/config/${module_name}/data/workflow_missing_relations.xml`;
84
+ } else {
85
+ destPath = `${ADDONS_PATH}/config/${module_name}/data/workflow_configuration.xml`;
86
+ }
87
87
 
88
- await fs.mkdir(path.dirname(destPath), { recursive: true });
89
- await fs.writeFile(destPath, content);
90
- console.log(`Processed: ${file.name} -> ${destPath}`);
91
- }
88
+ await fs.mkdir(path.dirname(destPath), { recursive: true });
89
+ await fs.writeFile(destPath, content);
90
+ console.log(`Processed: ${file.name} -> ${destPath}`);
91
+ }
92
92
 
93
- const workflowDir = path.join(ADDONS_PATH, "config", module_name, "data");
94
- const filesToAdd = [
95
- path.join(workflowDir, "workflow_missing_relations.xml"),
96
- path.join(workflowDir, "workflow_configuration.xml"),
97
- ];
93
+ const workflowDir = path.join(ADDONS_PATH, 'config', module_name, 'data');
94
+ const filesToAdd = [
95
+ path.join(workflowDir, 'workflow_missing_relations.xml'),
96
+ path.join(workflowDir, 'workflow_configuration.xml'),
97
+ ];
98
+
99
+ for (const filePath of filesToAdd) {
100
+ await new Promise((resolve, reject) => {
101
+ execFile('git', ['add', filePath], { cwd: ADDONS_PATH }, (error) => {
102
+ if (error) reject(error);
103
+ else resolve();
104
+ });
105
+ });
106
+ }
98
107
 
99
- for (const filePath of filesToAdd) {
108
+ const commitMessage = `[IMP][${module_name}] Update workflow`;
100
109
  await new Promise((resolve, reject) => {
101
- execFile("git", ["add", filePath], { cwd: ADDONS_PATH }, (error) => {
102
- if (error) reject(error);
103
- else resolve();
104
- });
110
+ execFile('git', ['commit', '-m', commitMessage], { cwd: ADDONS_PATH }, (error) => {
111
+ if (error) reject(error);
112
+ else resolve();
113
+ });
105
114
  });
106
- }
107
-
108
- const commitMessage = `[IMP][${module_name}] Update workflow`;
109
- await new Promise((resolve, reject) => {
110
- execFile(
111
- "git",
112
- ["commit", "-m", commitMessage],
113
- { cwd: ADDONS_PATH },
114
- (error) => {
115
- if (error) reject(error);
116
- else resolve();
117
- },
118
- );
119
- });
120
-
121
- console.log(`Committed with message: ${commitMessage}`);
115
+
116
+ console.log(`Committed with message: ${commitMessage}`);
122
117
  }
123
118
 
124
119
  export { main };
@@ -1,83 +1,73 @@
1
- import fs from "fs/promises";
2
- import path from "path";
3
- import { execFile } from "child_process";
4
- import { resolveAddonsPath } from "../lib/addons.js";
1
+ import { execFile } from 'child_process';
2
+ import fs from 'fs/promises';
3
+ import path from 'path';
4
+ import { resolveAddonsPath } from '../lib/addons.js';
5
5
 
6
6
  async function verbot(module_name, level) {
7
- if (!["major", "minor", "patch"].includes(level)) {
8
- throw new Error("Level must be one of major, minor, patch");
9
- }
7
+ if (!['major', 'minor', 'patch'].includes(level)) {
8
+ throw new Error('Level must be one of major, minor, patch');
9
+ }
10
10
 
11
- let ADDONS_PATH = resolveAddonsPath(process.env.ADDONS_PATH);
11
+ let ADDONS_PATH = resolveAddonsPath(process.env.ADDONS_PATH);
12
12
 
13
- let manifestPath = path.join(ADDONS_PATH, module_name, "__manifest__.py");
14
- try {
15
- await fs.access(manifestPath);
16
- } catch {
17
- manifestPath = path.join(
18
- ADDONS_PATH,
19
- "config",
20
- module_name,
21
- "__manifest__.py",
22
- );
13
+ let manifestPath = path.join(ADDONS_PATH, module_name, '__manifest__.py');
23
14
  try {
24
- await fs.access(manifestPath);
15
+ await fs.access(manifestPath);
25
16
  } catch {
26
- throw new Error(`__manifest__.py not found for module ${module_name}`);
17
+ manifestPath = path.join(ADDONS_PATH, 'config', module_name, '__manifest__.py');
18
+ try {
19
+ await fs.access(manifestPath);
20
+ } catch {
21
+ throw new Error(`__manifest__.py not found for module ${module_name}`);
22
+ }
27
23
  }
28
- }
29
24
 
30
- const content = await fs.readFile(manifestPath, "utf-8");
31
- const versionMatch = content.match(/"version":\s*"(15\.0\.\d+\.\d+\.\d+)"/);
32
- if (!versionMatch) {
33
- throw new Error("Version not found in manifest");
34
- }
25
+ const content = await fs.readFile(manifestPath, 'utf-8');
26
+ const versionMatch = content.match(/"version":\s*"(15\.0\.\d+\.\d+\.\d+)"/);
27
+ if (!versionMatch) {
28
+ throw new Error('Version not found in manifest');
29
+ }
35
30
 
36
- const currentVersion = versionMatch[1];
37
- const parts = currentVersion.split(".");
38
- const base = `${parts[0]}.${parts[1]}`;
39
- const major = parseInt(parts[2]);
40
- const minor = parseInt(parts[3]);
41
- const patch = parseInt(parts[4]);
31
+ const currentVersion = versionMatch[1];
32
+ const parts = currentVersion.split('.');
33
+ const base = `${parts[0]}.${parts[1]}`;
34
+ const major = parseInt(parts[2]);
35
+ const minor = parseInt(parts[3]);
36
+ const patch = parseInt(parts[4]);
42
37
 
43
- let newVersion;
44
- if (level === "patch") {
45
- newVersion = `${base}.${major}.${minor}.${patch + 1}`;
46
- } else if (level === "minor") {
47
- newVersion = `${base}.${major}.${minor + 1}.0`;
48
- } else if (level === "major") {
49
- newVersion = `${base}.${major + 1}.0.0`;
50
- }
38
+ let newVersion;
39
+ if (level === 'patch') {
40
+ newVersion = `${base}.${major}.${minor}.${patch + 1}`;
41
+ } else if (level === 'minor') {
42
+ newVersion = `${base}.${major}.${minor + 1}.0`;
43
+ } else if (level === 'major') {
44
+ newVersion = `${base}.${major + 1}.0.0`;
45
+ }
51
46
 
52
- const newContent = content.replace(
53
- `"version": "${currentVersion}"`,
54
- `"version": "${newVersion}"`,
55
- );
47
+ const newContent = content.replace(
48
+ `"version": "${currentVersion}"`,
49
+ `"version": "${newVersion}"`
50
+ );
56
51
 
57
- await fs.writeFile(manifestPath, newContent);
58
- console.log(`Updated version: ${currentVersion} -> ${newVersion}`);
52
+ await fs.writeFile(manifestPath, newContent);
53
+ console.log(`Updated version: ${currentVersion} -> ${newVersion}`);
59
54
 
60
- await new Promise((resolve, reject) => {
61
- execFile("git", ["add", manifestPath], { cwd: ADDONS_PATH }, (error) => {
62
- if (error) reject(error);
63
- else resolve();
55
+ await new Promise((resolve, reject) => {
56
+ execFile('git', ['add', manifestPath], { cwd: ADDONS_PATH }, (error) => {
57
+ if (error) reject(error);
58
+ else resolve();
59
+ });
64
60
  });
65
- });
66
61
 
67
- const commitMessage = `[VER][${module_name}] Bump`;
68
- await new Promise((resolve, reject) => {
69
- execFile(
70
- "git",
71
- ["commit", "-m", commitMessage],
72
- { cwd: ADDONS_PATH },
73
- (error) => {
74
- if (error) reject(error);
75
- else resolve();
76
- },
77
- );
78
- });
62
+ const commitMessage = `[VER][${module_name}] Bump`;
63
+ await new Promise((resolve, reject) => {
64
+ execFile('git', ['commit', '-m', commitMessage], { cwd: ADDONS_PATH }, (error) => {
65
+ if (error) reject(error);
66
+ else resolve();
67
+ });
68
+ });
79
69
 
80
- console.log(`Committed with message: ${commitMessage}`);
70
+ console.log(`Committed with message: ${commitMessage}`);
81
71
  }
82
72
 
83
73
  export { verbot };