jenkinsci/office-365-connector-plugin

Disable Markdown in message

pvolkemer opened this issue · 8 comments

Just started using the office 365 connector to send messages from a Jenkins Pipeline to an MS Teams Room web hook connector.
Some of my message Strings contain underscores like "this_is_my_message".
It seems the underscores are treated as markdown so the Result in Teams looks like this: "thisismy_message" where the "is" is italic.
Is there some way to disable markdown?

You may not be very happy with my response, but your issue actually helped me with my problem (putting nice markdown [link description](hxxp://some.th) url in message).
Guess the documentation could be better :)

@pvolkemer can you give some example?

Hi @damianszczepanik,
ok, I created a small Demo Project that just sends a notification to our Teams Room.
Here's the name of the Project:
image
And here's how it looks like in Teams:
image

As you can see, the Project Name in Teams is without the underscores which are interpreted as markdown for italics.

Nope, this is configured display name not the name which you provide when the job is created. Might be the same but does not have to be

It is the name that I provided when I created the job. I don't see a separate display name.

Thus us configured for job on Jenkins site

Does there are any solution can be used to solve the problem please?

Hey folks, I was running into this problem as well. I was using the office_365_connector_card module in my Ansible Tower environment and when trying to print my facts using variables I had the same issue with underscores. Not sure if this will work for your situation or not, but I found that by opening and closing the variables with a back tick " ` " it would revert to code output and allow the variable to retain formatting. As a side bonus, I think the output looks better as well:

Card_output

In my playbook code, the change was this:

Old format:

facts:
- name: "Without back ticks"
  value: "{{ this_is_it }}"

New format:

facts:
- name: "With back ticks"
  value: "`{{ this_is_it }}`"

Hope this helps someone!