refs #4975 Changes
gitea/salix/pipeline/head This commit looks good Details

This commit is contained in:
Guillermo Bonet 2023-01-31 14:47:24 +01:00
parent e12f183968
commit 18168b07bb
1 changed files with 8 additions and 9 deletions

View File

@ -152,21 +152,20 @@ module.exports = Self => {
formatDesc += `*${appName.toUpperCase()}* v.${toVersion} `;
let fromBranch = await models.MdbVersionTree.find({
const oldVersion = await models.MdbVersionTree.findOne({
where: {version: fromVersion},
fields: ['branchFk']
});
fromBranch = fromBranch[0].branchFk;
}, myOptions);
if (branch == fromBranch)
if (branch == oldVersion.branchFk)
formatDesc += `[*${branch}*]: `;
else
formatDesc += `[*${fromBranch}* » *${branch}*]: `;
formatDesc += `[*${oldVersion.branchFk}* » *${branch}*]: `;
const params = await models.MdbConfig.find({});
const issueTrackerUrl = params[0].issueTrackerUrl;
const issueNumberRegex = params[0].issueNumberRegex;
const chatDestination = params[0].chatDestination;
const params = await models.MdbConfig.findOne(myOptions);
const issueTrackerUrl = params.issueTrackerUrl;
const issueNumberRegex = params.issueNumberRegex;
const chatDestination = params.chatDestination;
const regex = new RegExp(issueNumberRegex, 'g');
formatDesc += description.replace(regex, (match, issueId) => {