Work with Rovo Dev in automations

This feature is currently in limited beta and available by invite. If your site already has access to Rovo Dev automation actions, admins can turn the feature on or off. If you don’t have access yet, an organization admin can request beta access before you can start using it.

Usage during limited beta

During limited beta:

  • Rovo Dev automation actions don’t use Rovo Dev credits to generate code.

  • Any subsequent modification to the automation-generated code using other Rovo Dev features will use Rovo Dev credits in line with those features. For example, modifying code with Rovo Dev CLI will consume credits. Modifying code with Rovo Dev in Jira doesn’t currently consume credits, but this may change in the future.

  • Beta users are limited to 10 Rovo Dev automation rules per site. We may also limit extremely heavy use of the feature or disable it if we detect potential abuse.

  • Rovo Dev automation actions rely on Jira automation. Your ability to run automation rules, including rules that use Rovo Dev, is subject to the automation limits of your Jira plan. For more about Jira automation limits, see Jira pricing.

  • Rovo Dev automation actions currently run in a restricted mode and don’t use Atlassian Teamwork Graph context. This means that Rovo Dev won’t read Confluence content that the connection user has access to.

We’ll notify beta users if any of this changes.

Use Rovo Dev actions in automations to automatically generate code for repetitive tasks at scale so your team can focus on more valuable work.

How Rovo Dev automation actions work

An automation rule for Rovo Dev uses the standard building blocks of Jira automation:

  • A trigger to kick off the execution of your rules, for example when a work item is updated.

  • Conditions to narrow the scope of your rule, for example when a specific label is added to the work item.

  • An action to perform the task you want to automate. Rovo Dev uses the Generate code action, and you can add other follow-up actions too.

When a Jira work item meets your rule conditions, automation runs. The Generate code action connects to a repository for Rovo Dev to make code changes and opens a draft pull request. It doesn’t merge the pull request directly, but hands it back to your team for review and merge

Find out how Jira Cloud Automation works in general

Rovo Dev automation actions are most useful for handling coding tasks at scale across multiple repositories. For single-repository tasks, try Rovo Dev in Jira, Rovo Dev CLI, or Rovo Dev in IDE.

はじめる前に

To create and manage automation rules using Rovo Dev actions, make sure:

Create an automation rule to generate code

Define your common coding patterns and use Rovo Dev to automatically generate code for repetitive tasks.

Start by automating small, low-risk tasks with Rovo Dev automation actions. As you get comfortable, expand to more scenarios and complex tasks.

To create an automation rule to generate code:

  1. In your Jira space, select More actions (…) next to your space name, then select Space settings.

  2. In the sidebar, select Automation.

  3. [ルールを作成] を選択します。

  4. Under Add a trigger, select a trigger, set it up, then select Next.

  5. Select Add component, then Add an action.

  6. Under Add an action, search for and select Generate code.

  7. Select a connected repository from the list, or select Infer repository from work item if you will add repository details to your work item descriptions.

    1. Select Settings () to configure the branch name and source branch, and whether to create a draft pull request after each automation.

  8. In the Prompt field, give Rovo Dev instructions on the code you want to generate.

  9. [次へ] を選択します。

  10. [ルールをオンにする] を選択します。

See details on when the rule has triggered and the code generated in the audit log.

The time required for the rule to run depends on repository size and complexity of the task.

When the rule runs, Rovo Dev makes code changes on a branch and creates a draft pull request in the repository you provided. You can review the pull request directly in the repository, or open the Jira work item and use the repository link under:

  • the Development section in the Details panel

  • the Rovo Dev section in the listed sessions

Review the changes, make any edits you need, then approve and merge the pull request when you’re ready.

権限

Jira space admins can create and manage space automation rules.

Any Jira user can trigger those rules, either manually or when a work item meets the rule’s conditions.

The generate code action respects the Connection user’s access to Rovo Dev app and repositories. What are connections in Automation?

スマート値

Use smart values to change the behaviour of rules based on specific criteria.

Smart rules can be used in the repository and prompt fields of the generate code action.

For example, using the {{issue.labels}} smart value, you could get Rovo Dev to code in one repository or another based on the work item label.

The generate code action also outputs smart values to use in other automation steps:

スマート値

説明

{{rovodev.codeGeneration.jobId}}

ID of the coding session

{{rovodev.codeGeneration.repoUrl}}

URL of the repository

Use a template to set up automation with Rovo Dev

Rovo Dev actions in automation work best when you use them on repeatable tasks. To help you get started quickly, Jira includes templates based on how Atlassian teams use Rovo Dev to handle common, repetitive work.

You can start with a template, then adjust the trigger, conditions, and prompt so the rule fits your team’s workflow.

To use a template for automation:

  1. In your Jira space, select More actions () next to your space name, then select Space settings.

  2. In the sidebar, select Automation.

  3. Scroll to the Rovo Dev section to find available templates, for example, the feature flag removal template.

  4. Select the template to create a rule based on it.

  5. Review the rule details, trigger, condition, and action. Update them as needed.

  6. Select Turn on rule when you’re ready.

Example of a feature flag removal automation template

We’ll demonstrate how you can use the feature flag removal automation template that uses the Rovo Dev Generate code action. This automation detects work items that require flag cleanup and applies code changes based on the work item description or a custom prompt. It then opens a draft pull request for review so teams can remove stale feature flags faster with less manual effort.

Step 1: Set up an automation rule based on the template

  1. From the automation templates list select the feature flag removal template.

  2. Review the rule details and update as required.

  3. Select and review the the Work item updated trigger. It has a condition to trigger when a new label called feature-flag-cleanup is added to the work item.

  4. Select the Generate code action to review the repository settings.

  5. Select a connected repository from the list, or select Infer repository from work item if you will add repository details to your work item descriptions.

  6. Provide a prompt to include additional context or instructions alongside the work item's description. See an example prompt below.

  7. Select the Code settings icon ( ) next to the Repository field, to specify the branch name, source branch, and other branch options.

  8. Optionally, add another action to add a comment to the work item so that teams get notified when the automation runs and Rovo Dev has finished work.

  9. ルールを保存します。

Example prompt

This example prompt is for illustration only. You can use it as a starting point and then tailor your own prompt to suit your specific scenario and requirements.

You are a senior software engineer asked to help write code to clean up a stale feature gate from a code repository. You implement code, you don’t guide users, you actually implement the code using the “Generate Code” action. You MUST Complete below tasks in the following order. You’re authorized to perform the below steps without additional confirmation. 1. Extract feature gate name {gate_name} from Jira ticket title or the field "Feature gate name" 2. Extract the final behaviour {final_gate_value} from "Feature gate Default value" in the Jira ticket description. If it is not provided in the description, infer the default value from the code. 3. Extract the repository {repository_url} from the desired repository 4. Start the feature gate clean up process using the following instructions <TASK_SUMMARY_TEMPLATE> For the following code repository: {repository_url} The feature gate we need to clean up is called: {gate_name} It now always serves the value {final_gate_value}, meaning this feature is now permanent and should be integrated into the main code path. Feature Gate Definition Cleanup: - Remove the feature gate constant/variable definition - Follow imports/references to find all usage of this feature gate including both production code and test files - Remove the feature gate from configuration files (e.g., docker-compose, properties) Feature Gate Usage Cleanup: For conditional blocks checking this feature gate: Keep only the {final_gate_value} path code Remove the conditional wrapper and else blocks entirely For if/else blocks using the feature gate: Replace the entire if/else with just the {final_gate_value} code path Remove any variable assignments that only serve the conditional When removing feature gate parameters: Remove the parameter from method/constructor signatures Find and update ALL calling code by following imports and references When modifying a class: Remove the parameter from the constructor Remove any code blocks using the parameter Update all class methods and properties that depend on the removed parameter Update all code that depends on the class’s interface For test files: Remove tests that only verify feature gate behavior Remove ALL feature gate mocking/setup code Convert parameterized tests that only vary by this gate into regular tests using the {final_gate_value} behavior Remove the feature gate parameter from test method signatures Code Quality Guidelines: Maintain consistent code formatting after removals Preserve any necessary comments/documentation that aren’t specific to the feature gate Keep error handling and logging that isn’t specific to feature gate checks Ensure method signatures remain compatible with their interfaces after parameter removal Speed Optimisations If you are trying to search for text in the codebase using a bash tool, I would use “git grep” over “find . -type f -exec grep” because it much faster The goal is to make the {final_gate_value} behavior permanent by integrating it directly into the code rather than just changing the gate’s default value. </TASK_SUMMARY_TEMPLATE>

Step 2: Create a work item and trigger the automation

  1. Create a work item in your Jira space to clean up a feature flag.

  2. In the work items details, provide the following details:

    1. The feature flag key.

    2. The repository that the generate code action should work on. The generate code action will use this repository if you’ve chosen the Infer repository from work item option.

    3. The final value of the feature flag after rollout.

  3. Add the feature-flag-cleanup label to the work item, so that Rovo Dev can identify this repetitive task and start working on it. Make sure the label matches exactly to what you’ve set in the automation rule.

Once you create the work item, automation will trigger the rule automatically and create a draft pull request in your repository.

Step 3: Review and merge the pull request created by Rovo Dev

When the rule runs, Rovo Dev makes code changes on a branch and creates a draft pull request in the repository you provided. You can review the pull request directly in the repository, or open the Jira work item and use the repository link under:

  • the Development section in the Details panel

  • the Rovo Dev section in the listed sessions

Review the changes, make any edits you need, then approve and merge the pull request when you’re ready.

    さらにヘルプが必要ですか?

    アトラシアン コミュニティをご利用ください。