GitLab Duoでマージリクエスト(MR)の説明を自動作成 #GitLab #GitLabDuo #AI

はじめに

GitLab Duoはソフトウェア開発ライフサイクル全体でAIを活用できる枠組みです。
GitLab Duoには様々な機能(一覧)が含まれています。今回はAIにマージリクエストの説明を作成してもらう機能を試してみましょう!

チャレンジ内容

前回はGitLab Duoを使ってUTを自動作成しました。その際に作成したUTのマージリクエストを作成して、その説明を作成してみます。

チャレンジ結果

マージリクエストの説明を作成してもらう機能の使い方は非常にシンプルです。マージリクエストの作成画面で「コード変更のサマリー」ボタンをクリックします。

数秒待つと、説明が記入されます。

# Summary of Changes

This update focuses on improving the testing capabilities of a React application that handles bento box ordering. The main change is upgrading the user-event testing library from version 13.5.0 to 14.6.1, which provides better simulation of user interactions in tests.

The bulk of the changes involve adding comprehensive test coverage for a "Main" component that handles bento ordering functionality. The tests verify that:

1. The component renders correctly with all bento options
2. Employee numbers can be entered properly
3. Orders can't be placed without an employee number
4. Order confirmations work as expected
5. Orders can be canceled
6. CSV export functionality works correctly
7. Error handling works for API failures

The tests use mocks to simulate AWS Amplify API calls and CSV generation, allowing the tests to run without actual backend connections. This ensures the component's behavior is thoroughly validated across various user scenarios.

結果の評価

変更内容の概要がわかりやすく記述されています。言語の設定はなく、英語で記入されました。必要であれば、別途AIを用いて日本語にするとよさそうです。

まとめ

説明の叩き台として利用するのには十分便利と言えます。今回のマージリクエストのように簡単な内容であれば、特に修正する必要もなく、そのまま採用できます。既にGitLabを利用中の方は、GitLab Duoの導入を考えてみるのも良さそうです。

Author

教育系エンジニア。開発やR&Dで最前線の技術を実践しつつ、後進の育成にも魂を燃やす。排出者は数千名。無類の子ども好きで、平日夕方は仕事を中抜けして近所の子どもと遊ぶ毎日。小学校でのプログラミング授業なども経験あり。

上村国慶の記事一覧

新規CTA