Skip to content

Commit 752cdce

Browse files
committed
Add instructions for using GitHub Copilot to implement dog filtering feature
1 parent 6b72688 commit 752cdce

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

content/5-code.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,25 @@ In the [prior exercise][walkthrough-previous], you utilized **ask mode** in GitH
2424

2525
By using agent mode, we'll be able to both create the code and tests, but have Copilot run the tests and correct any mistakes it might find.
2626

27+
## Create the filter and tests
28+
29+
Let's ask Copilot to generate the code to add the feature and tests!
30+
31+
1. Return to your codespace, or reopen it by navigating to your repository and selecting **Code** > **Codespaces** and the name of your codespace.
32+
2. Open Copilot Chat.
33+
3. Below the prompt dialog, ensure **Agent** is selected from the mode dropdown on the left.
34+
4. Use the following prompt to ask Copilot to generate the necessary code and tests to implement filtering:
35+
36+
```markdown
37+
Update the website to allow for filtering of dogs by breed and adoption status. The page should update as filters are modified. Ensure both unit tests and end to end tests are created, and they all pass. If any tests are failing, make the necessary updates so they pass.
38+
```
39+
2740
## Summary and next steps
41+
2842
Congratulations! You've worked with GitHub Copilot to add new features to the website - the ability to filter the list of dogs. Let's close out by [creating a pull request with our new functionality][walkthrough-next]!
2943

3044
## Resources
45+
3146
- [Asking GitHub Copilot questions in your IDE][copilot-questions]
3247
- [Copilot Edits][copilot-chat-edits]
3348
- [Copilot Chat cookbook][copilot-chat-cookbook]

0 commit comments

Comments
 (0)