Are you in the loop? Keep up with the latest by making sure you're subscribed to Community Announcements. Just click Watch and select Articles.

×
Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Formatting code blocks using the Jira SM Cloud integration

I've connected Opsgenie with Jira (using the Jira Service Management Cloud integration) so certain alerts in Opsgenie are reflected as an issue in Jira.

I'm including YAML code blocks in the alert description using the text formatting notation specified here, so the issue description is something like: 

Some description of the alert here.

My code block:
{code:yaml}
metadata:
name: myname
key1: value1
data:
replicas: 1
somelist:
- item1
- item2
{code}

I expect the issue description to be something like:

Screenshot 2022-12-28 182618.png

The problem is the language is not being properly highlighted in Jira. Although it understands the code block as such, it doesn't seem to detect the configured language (YAML) and highlights it as Java code:

Screenshot 2022-12-28 182744.png

Is there any other way of formatting code blocks via API?

 

tl;dr: I'm trying to format a YAML code block using Jira's markup language, but the code block is being presented as Java code. I'm using the API interface, not the browser. What's the proper way to do it?

1 answer

1 vote
Shivam Naik
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Dec 29, 2022

Hi @Jorge Carpio ,

This is a case I think would benefit from being looked at closer in a Support Ticket, but can you confirm what API endpoint you're using so that we can do some testing on our end between languages?

Thank you!

@Shivam Naik - Did you resolve this issue?

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
TAGS
AUG Leaders

Atlassian Community Events