jira integration incorrectly formats sign-off message in commit render
Summary
When enabling JIRA integration, commit messages with an issue identifier before a final sign-off line will remove a new-line in the rendered (UX) commit message.
Steps to reproduce
Note this example commit message:
test
Bug-identified-by: PROJECT-3
Signed-off-by: Example User <user@example.com>
- Using a new project or an existing project, create a commit with the above commit message. Notice the rendering of the message after committing shows a newline between
Bug-identified-byandSigned-off-by. - In the project's integration page, enable the
Jiraintegration (note a ready JIRA instance is not required; dummy values can be placed insideWeb URL,UsernameandPasswordand the settings can be saved). - Make a new commit with the exact same commit message. Notice that the newline between
Bug-identified-byandSigned-off-byhas been removed (render only) and the value forBug-identified-byshows a auto-URL.
Example Project
An example project shows the issue:
https://gitlab.com/jdknight/jira-integration-commit-msg/-/commits/master
What is the current bug behavior?
When a JIRA integration auto-link is created right before a sign-off message, the resulting rendering removes a newline between the two lines.
It is unknown if any other commit message processing could result in the same issue from being observed.
Manually inspecting git log shows the repository's commit messages are correct.
What is the expected correct behavior?
The newline formatting between the two meta fields should still exist in the rendering of the commit message.
Relevant logs and/or screenshots
Rendering of the issue:
git log output of example repository
$ git log
commit 91cf3b383ffecf0e86b530402a947bd204bc8e31 (HEAD -> master, origin/master, origin/HEAD)
...
Date: Wed Sep 16 22:56:55 2020 +0000
test removed integration
Bug-identified-by: PROJECT-3
Signed-off-by: Example User
commit eb46be6a825087ab9bb90ab23a2ec5bbb8125be8
...
Date: Wed Sep 16 22:56:29 2020 +0000
test post-integration
Bug-identified-by: PROJECT-3
Signed-off-by: Example User
commit 9580d25e52ffb09791083e58d8173529b948f771
...
Date: Wed Sep 16 22:55:07 2020 +0000
test pre-integration
Bug-identified-by: PROJECT-3
Signed-off-by: Example User
Output of checks
This bug happens on GitLab.com and self-hosted.
