From c79acd2e4d95b00dc1c3e5a7b7714a131c742411 Mon Sep 17 00:00:00 2001 From: Alon Carmel Date: Tue, 8 Oct 2024 15:08:38 +0300 Subject: [PATCH] step --- quest.yml | 1 + steps/02_create_node_server_prompt.yml | 1 - steps/03_run_both_servers.yml | 4 +--- steps/04_migrate_endpoints.yml | 2 +- steps/05_update_readme.yml | 5 +---- steps/create_new_branch.yml | 24 ++++++++++++++++++++++++ 6 files changed, 28 insertions(+), 9 deletions(-) create mode 100644 steps/create_new_branch.yml diff --git a/quest.yml b/quest.yml index 8b34816..a25119c 100644 --- a/quest.yml +++ b/quest.yml @@ -11,6 +11,7 @@ skills: - documentation steps: - run_python_server + - create_new_branch - create_node_server_prompt - run_both_servers - migrate_endpoints diff --git a/steps/02_create_node_server_prompt.yml b/steps/02_create_node_server_prompt.yml index ce52927..97696e3 100644 --- a/steps/02_create_node_server_prompt.yml +++ b/steps/02_create_node_server_prompt.yml @@ -11,7 +11,6 @@ startFlow: person: lucca messages: - text: Alright, the Python server is working. Now, let's use a bit of Copilot magic. - - text: Before we start, let's **create a new branch because we're going to change some things** and eventually open a PR. - text: "Then, open GitHub Copilot chat and use the '@workspace /new' option to create a new project and put it under a `node-server` folder. We want a simple Node.js server with Docker. Here's an example prompt you can use:" - text: | ``` diff --git a/steps/03_run_both_servers.yml b/steps/03_run_both_servers.yml index a856a12..72934e3 100644 --- a/steps/03_run_both_servers.yml +++ b/steps/03_run_both_servers.yml @@ -19,9 +19,7 @@ startFlow: ``` @workspace modify the commands to run both servers, the Python app (on port 8000) and the Node app (on port 8001) in the #file:docker-compose.yml ``` - - text: - If all is well, :instruction[create a PR with these changes.] This was once a nightmare - without Copilot, but look at us now! + - text: If all is well, :instruction[create a new branch and open a PR with your changes, and I'll review it.] This was once a nightmare without Copilot, but look at us now! githubActions: commands: diff --git a/steps/04_migrate_endpoints.yml b/steps/04_migrate_endpoints.yml index 1f8ccc6..ea76b49 100644 --- a/steps/04_migrate_endpoints.yml +++ b/steps/04_migrate_endpoints.yml @@ -16,7 +16,7 @@ startFlow: - text: Use GitHub Copilot chat to migrate the endpoints from the Python server to our Node server. - text: We can do it easily by giving copilot the code we want to migrate and ask them for help. - text: Add the Python code you want to migrate [to the chat](https://code.visualstudio.com/docs/copilot/getting-started-chat#_add-chat-context) and ask Copilot to translate it to Node.js. - - text: Once the migration is complete, commit the changes and open a PR. Ness will be thrilled with our progress. + - text: Once the migration is complete, :instruction[create a new branch and open a PR with your changes, and I'll review it]. githubActions: commands: diff --git a/steps/05_update_readme.yml b/steps/05_update_readme.yml index c878790..68fa65e 100644 --- a/steps/05_update_readme.yml +++ b/steps/05_update_readme.yml @@ -15,12 +15,9 @@ startFlow: - text: Let's update the README file to reflect our new Node.js server and the migration details. Thankfully, Copilot can help with this too. - - text: Make sure to create a new branch for these changes. - text: Select the text in the README and use [inline chat](https://code.visualstudio.com/docs/copilot/getting-started-chat#_stay-in-the-flow-with-inline-chat) - to ask Copilot for updates. Once you're done, commit the changes - and open a final PR. Ness will likely throw a party with all this progress. - + to ask Copilot for updates. Once you're done, :instruction[create a new branch and open a PR with your changes for review]. trigger: type: github_pr_lifecycle_status flowNode: diff --git a/steps/create_new_branch.yml b/steps/create_new_branch.yml new file mode 100644 index 0000000..8a82dc6 --- /dev/null +++ b/steps/create_new_branch.yml @@ -0,0 +1,24 @@ +id: create_new_branch +learningObjectives: + - "How to create a new branch and commit changes to your GitHub repository" +startFlow: + do: + - actionId: bot_message + params: + person: lucca + messages: + - text: "For any code change, we recommend creating a branch in your GitHub repository." + - text: "In Git, branches are an essential part of your everyday development process. Git branches act as pointers to a snapshot of your changes." + - text: "To create a new branch in your GitHub repository, click the bottom left button labeled 'Main'." + - text: "![](https://res.cloudinary.com/wilco/image/upload/v1728385920/clickonmain_mwlhbe.png)" + - text: "From the drop-down menu, select '+ Create new branch,' name it, and switch to that branch." + - text: "![](https://res.cloudinary.com/wilco/image/upload/v1728385920/createnewbranch_yzevbl.png)" + - text: "Let me know when you are ready." + - actionId: ready_message + params: + person: lucca +trigger: + type: user_ready_response + flowNode: + do: + - actionId: finish_step \ No newline at end of file