Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change new line value from /n to <br> so the email is correctly formtted #80

Conversation

xjusko
Copy link
Collaborator

@xjusko xjusko commented Apr 8, 2024

resolves #79

Copy link
Collaborator

@The-Huginn The-Huginn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can also update itemization of issues utilizing unordered list

    html tag, which also adds the bullet character. Please see https://www.w3schools.com/tags/tag_li.asp
    Also, I might be worth it adding
    tag into the PROJECT_LINE and LINK_LINE.Thus would be PROJECT_LINE = "...<br>\n" so it still looks readable in String form. PROJECT_LINE` you might additionally wrap into

    tag

@@ -106,7 +106,7 @@ public static String createEmailText(String email, List<Issue> issues) {
projectLinksEntry.getValue().stream()
.map(issue -> LINK_LINE.formatted(issue.getBrowseUri().toString()))
.collect(Collectors.joining()))
.collect(joining("\n")),
.collect(joining("<br>")),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
.collect(joining("<br>")),
.collect(joining("<br>\n")),

So the string represantation is still human-readable

@xjusko xjusko force-pushed the issue-79_put-correct-newline-between-projects branch from e0bb6fc to 2140109 Compare April 10, 2024 07:47
Copy link
Collaborator

@The-Huginn The-Huginn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Except the suggestion, LGTM

})
.collect(Collectors.joining("\n"));

return String.format(EMAIL_BODY, getUsername(email), projectHtml, configFileUrl());
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
return String.format(EMAIL_BODY, getUsername(email), projectHtml, configFileUrl());
return EMAIL_BODY.formatted(getUsername(email), projectHtml, configFileUrl());

@xjusko xjusko force-pushed the issue-79_put-correct-newline-between-projects branch from 2140109 to 5b1db05 Compare April 10, 2024 08:07
@xjusko
Copy link
Collaborator Author

xjusko commented Apr 10, 2024

For the reference, this is how the email will be formatted after the changes.
image

@The-Huginn The-Huginn merged commit 5d2830d into jboss-set:main Jun 5, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

New lines between projects
2 participants