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
dd93c1c1
Commit
dd93c1c1
authored
7 years ago
by
Rhys Arkins
Browse files
Options
Downloads
Patches
Plain Diff
fix: search changelogs down to fourth heading deep
Closes #1687
parent
3eaa75f3
Branches
Branches containing commit
Tags
11.37.14
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/workers/pr/release-notes.js
+17
-2
17 additions, 2 deletions
lib/workers/pr/release-notes.js
with
17 additions
and
2 deletions
lib/workers/pr/release-notes.js
+
17
−
2
View file @
dd93c1c1
...
...
@@ -93,8 +93,23 @@ async function getReleaseNotesMd(repository, version) {
logger
.
trace
(
'
Could not parse top level headings. Trying second level
'
);
changelogParsed
=
changelogMd
.
match
(
/^##
([^
#
]
+
?)\n([^]
+
?)(?=
^##
[^
#
])
/gm
);
if
(
!
changelogParsed
||
changelogParsed
.
length
===
1
)
{
logger
.
info
({
repository
},
'
No second level changelogs headings found
'
);
return
null
;
logger
.
debug
({
repository
},
'
No second level changelogs headings found
'
);
changelogParsed
=
changelogMd
.
match
(
/^###
([^
#
]
+
?)\n([^]
+
?)(?=
^###
[^
#
])
/gm
);
if
(
!
changelogParsed
||
changelogParsed
.
length
===
1
)
{
logger
.
debug
(
{
repository
},
'
No second third changelogs headings found
'
);
changelogParsed
=
changelogMd
.
match
(
/^####
([^
#
]
+
?)\n([^]
+
?)(?=
^####
[^
#
])
/gm
);
if
(
!
changelogParsed
||
changelogParsed
.
length
===
1
)
{
logger
.
info
({
repository
},
'
No changelogs headings found
'
);
return
null
;
}
}
}
}
for
(
const
section
of
changelogParsed
)
{
...
...
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