chatBot.postMessage(MessageFormat.format("\\[[**{0}**]({1})\\] [**{2}**]({3}) assigned [**{4}**]({5}) to issue [**#{6}: {7}**]({8})",
With some refactoring, that could become something like:
chatBot.postMessage(SomeFormat.format("%repository% %user% assigned %who% to issue %issue%",
The reason I propose this is because the \\[[**{0}**]({1})\\] format is used a lot, together with the parameters event.getRepository().getFullName() and event.getRepository().getHtmlUrl()
In the current code, there's a whole lot of this:
chatBot.postMessage(MessageFormat.format("\\[[**{0}**]({1})\\] [**{2}**]({3}) assigned [**{4}**]({5}) to issue [**#{6}: {7}**]({8})",
With some refactoring, that could become something like:
chatBot.postMessage(SomeFormat.format("%repository% %user% assigned %who% to issue %issue%",
The reason I propose this is because the
\\[[**{0}**]({1})\\]
format is used a lot, together with the parametersevent.getRepository().getFullName()
andevent.getRepository().getHtmlUrl()