Home > Enterprise >  How can i parse information in a HTML Telegram Message?
How can i parse information in a HTML Telegram Message?

Time:11-19

i have integration with Jira and Telegram to send issue's comment when a git commit is done (I use Jenkins). Using a pipeline i can comment issues, but Telegram message looks so ugly. I want to modify this information before send message (deleted url link for example) to Telegram, in Jira this format is ok, Thank You!

Jira comments it's like this:

enter image description here

And Telegram shows this:

enter image description here

CodePudding user response:

I found a solution, in Jira Automation, custom body message using .replaceAll method (Java) for regex:

Comentario: <b>{{issue.comments.last.body.replaceAll("\{panel\}.*?\{panel\}","").replaceAll.....

And we can use replaceAll a lot of times to create a new string starting from regex results.

enter image description here

Hope someone helps.

  • Related