Any idea how to do this? Could you provide a working example (with more than just a one line text)? Would it be possible to enable Rovo agents to provide valid ADF?
I can’t use the library in the Forge backend. I’ll get a warning while deployment and the action returns with an error (without any logs).
Forge backend
import {MarkdownTransformer} from "@atlaskit/editor-markdown-transformer";
...
export function someAction() {
console.log(">>>do something");
const markdownTransform = new MarkdownTransformer(schema);
...
}
Deployment (--verbose doesn’t provide any further hints)
...
ℹ Packaging app files
⚠ Critical dependency: require function is used in a way in which dependencies cannot be statically extracted
⚠ Critical dependency: require function is used in a way in which dependencies cannot be statically extracted
ℹ Uploading app
ℹ Validating manifest
...
You can create comments using the V3 API, but is doesn’t work when invoked from a Rovo Action
I can create comments, but only if I use valid ADF. Plaintext (or Markdown) is not accepted.
Something else or a combination of the above.
So it’s a combination
What I want is to add a comment in an action with the content provided by an agent. The content is more than a one line sentence. All of the examples I’ve found use the V2 API and contain only a simple sentence.
The Rovo agent is not capable to provide valid ADF to the action.
Have you created an action that has an input parameter like commentAdf which you’ve instructed Rovo format as ADF? If so, I think is would be better to specify input parameters for each field you want the comment to contain and then have your app compose these fields into ADF. If I’m on the wrong track, please provide specific details such as code that demonstrates your problem.
Yes, I initially tried instructing the Rovo agent to send valid ADF to the action, but it didn’t work. Based on that, I assumed Rovo might not support this directly - though it would be a useful extension.
Given this, I believe implementing transformers in the Forge backend within the action itself would be simpler. However, I’m open to any approach that allows me to write “longer,” formatted text as a comment in my action. Since these texts are not standardized, creating a template ADF and filling it with parameters wouldn’t be very helpful in this case.
The Atlaskit component also doesn’t produce a complete rendering of ADF (I think it doesn’t do any images). That is also causing issues with the migration to version 3 of the cloud REST API. Atlassian need to provide a complete renderer for ADF
I completely agree - a utility library for converting Markdown or HTML to ADF and vice versa would be fantastic! In my case, the Atlaskit Markdown transformer’s capabilities would suffice, but unfortunately, it doesn’t work in the Forge backend.
You both make good points. Our support of ADF is poor. At the heart of this issue is that we don’t provide a publicly supported ADF parser (Editor markdown transformer is not publicly supported) so that it can be used within a Forge app, but going further and supporting ADF typed action input parameters would be also great.
For now you have two options:
(a) Continue to build ADF from action input parameters using the ADF builder or template strings; or
(b) Avoid ADF and use version 2 of the Jira REST API.
I agree about the need for ADF support and believe this goes beyond just support in Rovo actions. Are you aware of any efforts to address this? Could you share any related issues or information about the roadmap?
In the meantime, I think I’ll parse the agent’s response myself and construct valid ADF from it.