Edit

Share via


Quickstart: create and apply your own tasks for GitHub Copilot app modernization

This quickstart shows you how to create and apply your own tasks when you use GitHub Copilot app modernization.

In code development, enterprises often have different processes and controls to adhere to their organizational policies and business needs. This area is where My Tasks (Custom) come in. Your own task is generated by analyzing code commits from already-migrated code. The task then guides Copilot to remediate code, following the pattern established by the already-migrated code.

The following video demonstrates using GitHub Copilot app modernization to create and apply your own custom task to migrate a Java project to Azure:


Prerequisites

Create your own task

Use the following steps to create your own task:

  1. Clone the Java migration copilot samples repository.

  2. In Visual Studio Code, open the rabbitmq-sender project folder in the samples' repository. Then, check out the project to the source branch.

  3. In the Activity sidebar, open the GitHub Copilot app modernization extension pane, hover the mouse over the TASKS section, and then select Create a Custom Task.

    Screenshot of Visual Studio Code that shows the button for Create Custom Task.

  4. In the pop-up dialog box, select Create new task.

    Screenshot of Visual Studio Code that shows the Create new task option.

  5. Type migrate rabbitmq to service bus to search for the commit that migrates RabbitMQ. Select the corresponding commit and then select OK.

    Screenshot of the Visual Studio Code dialog box with the heading Select commits you want to save.

  6. Select any uncommitted changes from Working tree if they exist, or you can just skip the choice and select OK here.

    Screenshot of the Visual Studio Code dialog box with the heading Select uncommitted changes.

  7. If you want to import the commits from a file, choose Select Files in the next pop-up dialog box. This option enables you to select files that contain the commit history you want to use for the custom task and the file you selected is processed locally. Select Skip file selection to continue.

    Screenshot of Visual Studio Code that shows the Describe changes using local files dialog box.

  8. A default task name is generated. Rename it custom task migrate rabbitmq and press Enter to confirm.

    Screenshot of Visual Studio Code that shows the Enter task name dialog box.

  9. A default task description is generated. Press Enter to confirm.

    Screenshot of Visual Studio Code that shows the Describe task details dialog box.

  10. Now, your own task for migrating rabbitmq is generated and shows in the TASKS - My Tasks section of the GitHub Copilot app modernization pane.

    Screenshot of Visual Studio Code that shows the Tasks section with the rabbitmq task showing.

Apply your own task

Use the following steps to apply your own task:

  1. Find your own task in the TASKS - My Tasks section of GitHub Copilot app modernization pane. Run this task by selecting Run Task.

    Screenshot of Visual Studio Code that shows the Tasks section with the Run task button highlighted.

  2. The Copilot chat window with Agent Mode opens automatically and proceeds to run various tools in the Copilot Chat window. It creates plan.md and progress.md for you to review and change. Manually input continue to confirm and proceed with the plan.

  3. During the code changes, repeatedly select Allow to let the agent run Git commands - for example, to check the version control system status or checkout a new branch for migration.

  4. Repeatedly input Continue to confirm the use of tools and wait for the code changes to finish.

  5. After code changes finish, repeatedly input Continue to proceed with the validation and fix iteration loop.

  6. After all validation finishes, review the code changes and confirm them by selecting Keep.

See also

Predefined tasks for GitHub Copilot app modernization