Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
O
oh-my-zsh
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
github
oh-my-zsh
Commits
a4a79eaa
Commit
a4a79eaa
authored
Dec 30, 2020
by
Marc Cornellà
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(changelog): remove CR characters in breaking change messages
The GitHub UI might not remove CR characters from commit description forms filled from a Windows browser.
parent
a251233b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
0 deletions
+2
-0
changelog.sh
tools/changelog.sh
+2
-0
No files found.
tools/changelog.sh
View file @
a4a79eaa
...
@@ -91,6 +91,8 @@ function parse-commit {
...
@@ -91,6 +91,8 @@ function parse-commit {
if
[[
"
$body
"
=
~
"BREAKING CHANGE: (.*)"
||
\
if
[[
"
$body
"
=
~
"BREAKING CHANGE: (.*)"
||
\
"
$subject
"
=
~
'^[^ :\)]+\)?!: (.*)$'
]]
;
then
"
$subject
"
=
~
'^[^ :\)]+\)?!: (.*)$'
]]
;
then
message
=
"
${
match
[1]
}
"
message
=
"
${
match
[1]
}
"
# remove CR characters (might be inserted in GitHub UI commit description form)
message
=
"
${
message
//
$'
\r
'
/
}
"
# skip next paragraphs (separated by two newlines or more)
# skip next paragraphs (separated by two newlines or more)
message
=
"
${
message
%%
$'
\n\n
'
*
}
"
message
=
"
${
message
%%
$'
\n\n
'
*
}
"
# ... and replace newlines with spaces
# ... and replace newlines with spaces
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment