Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
renovate
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
GitHub Mirror
Renovate Bot
renovate
Commits
f042c8db
Commit
f042c8db
authored
7 years ago
by
Rhys Arkins
Browse files
Options
Downloads
Patches
Plain Diff
fix: keep version in commitMessage/prTitle when grouping with types
parent
13484c6f
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/workers/repository/updates/generate.js
+12
-3
12 additions, 3 deletions
lib/workers/repository/updates/generate.js
with
12 additions
and
3 deletions
lib/workers/repository/updates/generate.js
+
12
−
3
View file @
f042c8db
...
@@ -3,7 +3,7 @@ const semver = require('semver');
...
@@ -3,7 +3,7 @@ const semver = require('semver');
const
{
mergeChildConfig
}
=
require
(
'
../../../config
'
);
const
{
mergeChildConfig
}
=
require
(
'
../../../config
'
);
function
generateBranchConfig
(
branchUpgrades
)
{
function
generateBranchConfig
(
branchUpgrades
)
{
logger
.
debug
(
`generateBranchConfig()`
);
logger
.
debug
(
{
length
:
branchUpgrades
.
length
},
`generateBranchConfig()`
);
logger
.
trace
({
config
:
branchUpgrades
});
logger
.
trace
({
config
:
branchUpgrades
});
const
config
=
{
const
config
=
{
upgrades
:
[],
upgrades
:
[],
...
@@ -39,7 +39,15 @@ function generateBranchConfig(branchUpgrades) {
...
@@ -39,7 +39,15 @@ function generateBranchConfig(branchUpgrades) {
// Delete group config regardless of whether it was applied
// Delete group config regardless of whether it was applied
delete
upgrade
.
group
;
delete
upgrade
.
group
;
delete
upgrade
.
lazyGrouping
;
delete
upgrade
.
lazyGrouping
;
if
(
newVersion
.
length
>
1
)
{
const
isTypesGroup
=
depNames
.
length
===
2
&&
!
hasGroupName
&&
((
branchUpgrades
[
0
].
depName
.
startsWith
(
'
@types/
'
)
&&
branchUpgrades
[
0
].
depName
.
endsWith
(
branchUpgrades
[
1
].
depName
))
||
(
branchUpgrades
[
1
].
depName
.
startsWith
(
'
@types/
'
)
&&
branchUpgrades
[
1
].
depName
.
endsWith
(
branchUpgrades
[
0
].
depName
)));
if
(
newVersion
.
length
>
1
&&
!
isTypesGroup
)
{
logger
.
debug
({
newVersion
});
delete
upgrade
.
commitMessageExtra
;
delete
upgrade
.
commitMessageExtra
;
upgrade
.
recreateClosed
=
true
;
upgrade
.
recreateClosed
=
true
;
}
else
if
(
semver
.
valid
(
newVersion
[
0
]))
{
}
else
if
(
semver
.
valid
(
newVersion
[
0
]))
{
...
@@ -81,6 +89,7 @@ function generateBranchConfig(branchUpgrades) {
...
@@ -81,6 +89,7 @@ function generateBranchConfig(branchUpgrades) {
upgrade
.
commitBody
upgrade
.
commitBody
)(
upgrade
)}
`
;
)(
upgrade
)}
`
;
}
}
logger
.
debug
(
`commitMessage: `
+
JSON
.
stringify
(
upgrade
.
commitMessage
));
if
(
upgrade
.
prTitle
)
{
if
(
upgrade
.
prTitle
)
{
upgrade
.
prTitle
=
handlebars
.
compile
(
upgrade
.
prTitle
)(
upgrade
);
upgrade
.
prTitle
=
handlebars
.
compile
(
upgrade
.
prTitle
)(
upgrade
);
upgrade
.
prTitle
=
handlebars
.
compile
(
upgrade
.
prTitle
)(
upgrade
);
upgrade
.
prTitle
=
handlebars
.
compile
(
upgrade
.
prTitle
)(
upgrade
);
...
@@ -98,7 +107,7 @@ function generateBranchConfig(branchUpgrades) {
...
@@ -98,7 +107,7 @@ function generateBranchConfig(branchUpgrades) {
upgrade
.
baseBranches
&&
upgrade
.
baseBranches
.
length
>
1
upgrade
.
baseBranches
&&
upgrade
.
baseBranches
.
length
>
1
?
'
({{baseBranch}})
'
?
'
({{baseBranch}})
'
:
''
;
:
''
;
logger
.
debug
(
`prTitle: `
+
JSON
.
stringify
(
upgrade
.
prTitle
));
// Compile again to allow for nested handlebars templates
// Compile again to allow for nested handlebars templates
upgrade
.
prTitle
=
handlebars
.
compile
(
upgrade
.
prTitle
)(
upgrade
);
upgrade
.
prTitle
=
handlebars
.
compile
(
upgrade
.
prTitle
)(
upgrade
);
logger
.
debug
(
`
${
upgrade
.
branchName
}
,
${
upgrade
.
prTitle
}
`
);
logger
.
debug
(
`
${
upgrade
.
branchName
}
,
${
upgrade
.
prTitle
}
`
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment