自動化で Jira Coding Agent を使用する

自動化で Jira Coding Agent を使用すると、繰り返し発生するタスクのコードを大規模に自動生成できるため、チームはより価値の高い作業に集中できます。

自動化での Jira Coding Agent の動作

Jira Coding Agent の自動化フローでは、Jira 自動化の標準的な構成要素を使用します。

  • トリガー: フローの実行を開始します。たとえば、作業項目が更新されたときに実行するよう設定できます。

  • 条件: フローの対象を絞り込みます。たとえば、作業項目に特定のラベルが追加された場合にのみ実行するよう設定できます。

  • アクション: 自動化するタスクを実行します。[Use Jira Coding Agent (Jira Coding Agent を使用)] アクションでは、後続のアクションを追加することもできます。

When a Jira work item meets your flow conditions, the automation runs. The Use Jira Coding Agent action connects the Jira Coding Agent to a repository so it can make code changes and open a pull request. It doesn’t merge the pull request directly, but hands it back to your team for review and merge.

Jira Cloud の自動化の一般的な仕組みをご確認ください。

The Jira Coding Agent runs in a restricted mode in automations and doesn’t use Atlassian Teamwork Graph context. This means that the Jira Coding Agent won’t read Confluence content that the session owner has access to.

Jira Coding Agent を使用した自動化フローは、ご利用の Jira プランの自動化制限数にカウントされます。。

Jira のプランと価格について読む


はじめる前に

Jira Coding Agent を使用して自動化フローを作成および管理するためには、次の点をご確認ください。

スペース自動化フローを作成および管理するには、Jira スペース管理者である必要があります。ただし、すべての Jira ユーザーが、手動で、または作業項目がフローの条件を満たしたときに、それらのフローをトリガーできます。

You can choose who owns the sessions generated by the Use Jira Coding Agent action:

  • Connection owner: the owner of the action’s connection. Use this for flows that don’t run on a work item, such as scheduled flows. Understand connections in automation

  • User who triggered the rule: the person whose action started the flow, for example by creating or updating a work item, or by triggering it manually.

  • Work item assignee: the person assigned to the work item the flow runs on.


コードを生成するための自動化フローを作成する

共通のコーディング パターンを定義し、Jira Coding Agent を使用して反復的なタスクのコードを自動生成します。

Start by automating small, low-risk tasks with the Jira Coding Agent automation action. As you get comfortable, expand to more scenarios and complex tasks.

コードを生成する自動化フローを作成するには、以下の手順に従います。

  1. Jira スペースで、スペース名の横にある [その他の操作] () を選択して、[スペース設定] を選択します。

  2. サイドバーで [自動化] を選択します。

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

  4. [Add a trigger (トリガーを追加)] でトリガーを選択して設定し、[次へ] を選択します。

  5. [ステップを追加] を選択してから、[アクションを追加] を選択します。

  6. [アクションを追加] の下で、「Use Jira Coding Agent (Jira Coding Agent の使用)」を検索して選択します。

  7. リストから接続済みのリポジトリを選択します。ただし、作業項目の説明にリポジトリの詳細を追加する場合は、[Infer repository from work item (作業項目からリポジトリを推測)] を選択します。

  8. Select Settings () to configure the branch name and source branch, and whether to create a pull request after each automation. If you create a pull request, choose whether it’s a draft or ready for review.

  9. In the Custom instructions field, give the Jira Coding Agent instructions on the code you want to generate.

  10. Optionally, select a model for the Jira Coding Agent to use.

  11. Under Session owner, choose who owns the sessions this flow creates: connection owner, user who triggered the rule, or work item assignee.

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

  13. [フローをオンにする] を選択します。


その他の注意事項

  • フローがトリガーされてコードが生成された日時を確認するには、監査ログを表示してください。

  • フローの実行に必要な時間は、リポジトリのサイズやタスクの複雑さによって異なります。

  • The session owner’s Rovo credits are used when the flow runs.

  • If the selected session owner isn’t available, for example a work item has no assignee, the flow fails and no session is created. Check the audit log for error details.

When the flow runs, the Jira Coding Agent makes code changes on a branch and creates a 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:

  • [詳細] パネルの [開発] セクション

  • エージェント セッション セクション

[Agent sessions (エージェント セッション)] セクションには、その作業項目に関連するすべてのエージェント型セッションが表示されます。これには、他のユーザーが所有および管理しているセッションも含まれます。

自身が所有するセッションの Jira Coding Agent を見つけて変更をレビューし、必要な編集を行ってから、準備ができ次第プル リクエストを承認してマージします。


スマート値の使用

スマート値は、特定の基準に基づいてフローの動作を変更します。自動化におけるスマート値について理解する

This means smart values can be used in the repository and custom instructions fields of the Use Jira Coding Agent action.

たとえば、{{issue.labels}} スマート値を使用すると、作業項目のラベルに基づいて、Jira Coding Agent にコーディングさせるリポジトリを切り替えることができます。

また、「Use Jira Coding Agent (Jira Coding Agent の使用)」アクションは、他の自動化ステップで使用するスマート値も出力します。

スマート値

説明

{{jiracodingagent.codeGeneration.jobId}}

コーディング セッションの ID

{{jiracodingagent.codeGeneration.repoUrl}}

リポジトリの URL

Jira Coding Agent の自動化でテンプレートを活用する方法を検討する

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

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