@waron97/prbot 3.1.2 → 3.1.3
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/package.json
CHANGED
|
@@ -196,7 +196,8 @@ function appendRefsToLine(line, tridentIds, jiras) {
|
|
|
196
196
|
const suffix = tridentIds.map((id) => `#${id}`).join(', ');
|
|
197
197
|
const tridentMatch = result.match(/Trident (#[\d, #]+)/);
|
|
198
198
|
if (tridentMatch) {
|
|
199
|
-
|
|
199
|
+
const existingTridents = tridentMatch[1].replace(/[,\s]+$/, '');
|
|
200
|
+
result = result.replace(/Trident (#[\d, #]+)/, `Trident ${existingTridents}, ${suffix}`);
|
|
200
201
|
} else {
|
|
201
202
|
const parenMatch = result.match(/\(([^)]*)\)\s*$/);
|
|
202
203
|
if (parenMatch) {
|
|
@@ -206,7 +206,7 @@ async function exportEmailTemplates(opts) {
|
|
|
206
206
|
const migrationDir = path.join(ADDONS_PATH, 'config', module, 'migrations', version);
|
|
207
207
|
preMigratePath = path.join(migrationDir, 'pre-migrate.py');
|
|
208
208
|
await fs.mkdir(migrationDir, { recursive: true });
|
|
209
|
-
await fs.writeFile(preMigratePath, generateEmailPreMigrateScript(renames));
|
|
209
|
+
await fs.writeFile(preMigratePath, generateEmailPreMigrateScript(renames, module));
|
|
210
210
|
log(`Wrote pre-migrate: ${preMigratePath}`);
|
|
211
211
|
}
|
|
212
212
|
}
|
package/src/lib/premigrate.js
CHANGED
|
@@ -175,7 +175,7 @@ function detectEmailRenames(oldMap, newMap) {
|
|
|
175
175
|
return renames;
|
|
176
176
|
}
|
|
177
177
|
|
|
178
|
-
function generateEmailPreMigrateScript(renames) {
|
|
178
|
+
function generateEmailPreMigrateScript(renames, module) {
|
|
179
179
|
const lines = [
|
|
180
180
|
'# Copyright 2025-TODAY Symphonie Prime S.r.l. (www.symphonieprime.com)',
|
|
181
181
|
'# All rights reserved.',
|
|
@@ -196,8 +196,8 @@ function generateEmailPreMigrateScript(renames) {
|
|
|
196
196
|
' ]',
|
|
197
197
|
' for old_name, new_name in renames:',
|
|
198
198
|
' env.cr.execute(',
|
|
199
|
-
|
|
200
|
-
|
|
199
|
+
` "UPDATE ir_model_data SET name = %s WHERE name = %s AND model = %s AND module = %s",`,
|
|
200
|
+
` (new_name, old_name, "mail.template", "${module}"),`,
|
|
201
201
|
' )',
|
|
202
202
|
);
|
|
203
203
|
|