Skip to content

Commit 74f3734

Browse files
authored
Change "Example prompts" short title to "Copilot Chat Cookbook" (#54264)
1 parent e6f2ed1 commit 74f3734

35 files changed

+81
-28
lines changed

content/account-and-profile/setting-up-and-managing-your-github-profile/customizing-your-profile/using-your-github-profile-to-enhance-your-resume.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -109,4 +109,4 @@ If you want to improve your profile even more, incorporate these practices into
109109

110110
## Further reading
111111

112-
* [AUTOTITLE](/copilot/example-prompts-for-github-copilot-chat/refactoring-code/improving-code-readability-and-maintainability)
112+
* [AUTOTITLE](/copilot/copilot-chat-cookbook/refactoring-code/improving-code-readability-and-maintainability)

content/copilot/example-prompts-for-github-copilot-chat/debugging-errors/debugging-invalid-json.md content/copilot/copilot-chat-cookbook/debugging-errors/debugging-invalid-json.md

+2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
title: Debugging invalid JSON
33
shortTitle: Debug invalid JSON
44
intro: '{% data variables.product.prodname_copilot_chat_short %} can identify and resolve syntax errors or structural issues in JSON data.'
5+
redirect_from:
6+
- /copilot/example-prompts-for-github-copilot-chat/debugging-errors/debugging-invalid-json
57
versions:
68
feature: copilot
79
category:

content/copilot/example-prompts-for-github-copilot-chat/debugging-errors/handling-api-rate-limits.md content/copilot/copilot-chat-cookbook/debugging-errors/handling-api-rate-limits.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
title: Handling API rate limits
33
shortTitle: Handle API rate limits
44
intro: '{% data variables.product.prodname_copilot_chat_short %} can help handle API rate limits by suggesting code that detects implements retry logic.'
5+
redirect_from:
6+
- /copilot/example-prompts-for-github-copilot-chat/debugging-errors/handling-api-rate-limits
57
versions:
68
feature: copilot
79
category:
@@ -32,7 +34,7 @@ def get_weather():
3234
city = request.args.get('city')
3335
# Simulate an API request to the external weather service
3436
response = requests.get(WEATHER_API_URL, params={"city": city})
35-
weather_data = response.json()
37+
weather_data = response.json()
3638

3739
return weather_data
3840
```

content/copilot/example-prompts-for-github-copilot-chat/debugging-errors/index.md content/copilot/copilot-chat-cookbook/debugging-errors/index.md

+2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
---
22
title: Debugging errors
33
intro: 'Discover ways that you can use {% data variables.product.prodname_copilot %} to debug errors during development.'
4+
redirect_from:
5+
- /copilot/example-prompts-for-github-copilot-chat/debugging-errors
46
versions:
57
feature: copilot
68
topics:

content/copilot/example-prompts-for-github-copilot-chat/documenting-code/documenting-legacy-code.md content/copilot/copilot-chat-cookbook/documenting-code/documenting-legacy-code.md

+6-4
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
title: 'Documenting legacy code'
33
shortTitle: Document legacy code
44
intro: '{% data variables.product.prodname_copilot_chat_short %} can help with documenting legacy code.'
5+
redirect_from:
6+
- /copilot/example-prompts-for-github-copilot-chat/documenting-code/documenting-legacy-code
57
versions:
68
feature: copilot
79
category:
@@ -59,8 +61,8 @@ INSERT-AND-VALIDATE.
5961
ELSE
6062
EXEC SQL ROLLBACK END-EXEC
6163
SET FAILED TO TRUE
62-
STRING "DB Error: " SQLCODE
63-
DELIMITED BY SIZE
64+
STRING "DB Error: " SQLCODE
65+
DELIMITED BY SIZE
6466
INTO WS-ERROR-MSG
6567
DISPLAY WS-ERROR-MSG
6668
END-IF
@@ -134,8 +136,8 @@ For example:
134136
ELSE
135137
EXEC SQL ROLLBACK END-EXEC *> Rollback if failed
136138
SET FAILED TO TRUE
137-
STRING "DB Error: " SQLCODE
138-
DELIMITED BY SIZE
139+
STRING "DB Error: " SQLCODE
140+
DELIMITED BY SIZE
139141
INTO WS-ERROR-MSG
140142
DISPLAY WS-ERROR-MSG
141143
END-IF
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
title: 'Explaining complex algorithms or logic'
33
shortTitle: Explain complex logic
44
intro: '{% data variables.product.prodname_copilot_chat_short %} can help add clear and concise documentation on complex algorithms or logic.'
5+
redirect_from:
6+
- /copilot/example-prompts-for-github-copilot-chat/documenting-code/explaining-complex-algorithms-or-logic
57
versions:
68
feature: copilot
79
category:

content/copilot/example-prompts-for-github-copilot-chat/documenting-code/explaining-legacy-code.md content/copilot/copilot-chat-cookbook/documenting-code/explaining-legacy-code.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
title: 'Explaining legacy code'
33
shortTitle: Explain legacy code
44
intro: '{% data variables.product.prodname_copilot_chat_short %} can help with explaining unfamiliar code.'
5+
redirect_from:
6+
- /copilot/example-prompts-for-github-copilot-chat/documenting-code/explaining-legacy-code
57
versions:
68
feature: copilot
79
category:
@@ -60,8 +62,8 @@ INSERT-AND-VALIDATE.
6062
ELSE
6163
EXEC SQL ROLLBACK END-EXEC
6264
SET FAILED TO TRUE
63-
STRING "DB Error: " SQLCODE
64-
DELIMITED BY SIZE
65+
STRING "DB Error: " SQLCODE
66+
DELIMITED BY SIZE
6567
INTO WS-ERROR-MSG
6668
DISPLAY WS-ERROR-MSG
6769
END-IF

content/copilot/example-prompts-for-github-copilot-chat/documenting-code/index.md content/copilot/copilot-chat-cookbook/documenting-code/index.md

+2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
---
22
title: Documenting code
33
intro: 'Discover ways that you can use {% data variables.product.prodname_copilot_chat %} to document your code.'
4+
redirect_from:
5+
- /copilot/example-prompts-for-github-copilot-chat/documenting-code
46
versions:
57
feature: copilot
68
topics:
+8-6
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
title: 'Syncing documentation with code changes'
33
shortTitle: Sync documentation
44
intro: '{% data variables.product.prodname_copilot_chat_short %} can help with keeping code documentation up-to-date.'
5+
redirect_from:
6+
- /copilot/example-prompts-for-github-copilot-chat/documenting-code/syncing-documentation-with-code-changes
57
versions:
68
feature: copilot
79
category:
@@ -22,14 +24,14 @@ It can be difficult to keep documentation up to date with changes to code. Howev
2224
```typescript
2325
/**
2426
* Retrieves all products belonging to a specific category.
25-
*
27+
*
2628
* @param categoryId - The unique identifier of the product category
2729
* @returns Promise that resolves to an array of Product objects
28-
*
30+
*
2931
* @example
3032
* const products = await getByCategoryName(5);
3133
* // Returns: [{id: 1, name: "Product 1", categoryId: 5}, ...]
32-
*
34+
*
3335
* @throws {PrismaClientKnownRequestError} If database query fails
3436
* @see {@link https://www.prisma.io/docs/reference/api-reference/prisma-client-reference#findmany}
3537
*/
@@ -65,16 +67,16 @@ For example:
6567
```typescript
6668
/**
6769
* Retrieves all products belonging to a specific category with pagination and recent reviews.
68-
*
70+
*
6971
* @param categoryId - The unique identifier of the product category
7072
* @param page - The page number for pagination (default: 1)
7173
* @param pageSize - Number of products per page (default: 10)
7274
* @returns Promise that resolves to an array of Product objects with their 5 most recent reviews
73-
*
75+
*
7476
* @example
7577
* const products = await getByCategoryName(5, 2, 20);
7678
* // Returns: [{id: 1, name: "Product 1", categoryId: 5, reviews: [...5 recent reviews]}, ...]
77-
*
79+
*
7880
* @throws {PrismaClientKnownRequestError} If database query fails
7981
* @see {@link https://www.prisma.io/docs/reference/api-reference/prisma-client-reference#findmany}
8082
*/
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
title: 'Analyzing and incorporating user feedback'
33
shortTitle: Incorporate feedback
44
intro: '{% data variables.product.prodname_copilot_chat_short %} can enhance the process of incorporating user feedback into your project.'
5+
redirect_from:
6+
- /copilot/example-prompts-for-github-copilot-chat/functionality-analysis-and-feature-suggestions/analyzing-and-incorporating-user-feedback
57
versions:
68
feature: copilot
79
category:
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ shortTitle: Explore feature implementations
44
intro: >-
55
{% data variables.product.prodname_copilot_chat_short %} can help explore
66
different approaches for implementing a single feature.
7+
redirect_from:
8+
- /copilot/example-prompts-for-github-copilot-chat/functionality-analysis-and-feature-suggestions/exploring-potential-feature-implementations
79
versions:
810
feature: copilot
911
category:
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
---
22
title: Functionality analysis and feature suggestions
33
intro: 'Discover ways that you can use {% data variables.product.prodname_copilot %} to improve the functionality of your project.'
4+
redirect_from:
5+
- /copilot/example-prompts-for-github-copilot-chat/functionality-analysis-and-feature-suggestions
46
versions:
57
feature: copilot
68
topics:
79
- Copilot
810
children:
911
- /exploring-potential-feature-implementations
1012
- /analyzing-and-incorporating-user-feedback
11-
---
13+
---

content/copilot/example-prompts-for-github-copilot-chat/index.md content/copilot/copilot-chat-cookbook/index.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
---
22
title: Copilot Chat Cookbook
3-
shortTitle: Example prompts
43
intro: 'Find examples of prompts to use with {% data variables.product.prodname_copilot_chat %}.'
54
allowTitleToDifferFromFilename: true
5+
redirect_from:
6+
- /copilot/example-prompts-for-github-copilot-chat
67
versions:
78
feature: copilot
89
topics:
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
title: Decoupling business logic from UI components
33
shortTitle: Decoupling business logic
44
intro: '{% data variables.product.prodname_copilot_chat_short %} can help you separate your business logic from your user interface code, making it easier to maintain and scale your application.'
5+
redirect_from:
6+
- /copilot/example-prompts-for-github-copilot-chat/refactoring-code/decoupling-business-logic-from-ui-components
57
versions:
68
feature: copilot
79
category:
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
title: 'Fixing database deadlocks or data integrity issues'
33
shortTitle: Fixing database deadlocks
44
intro: '{% data variables.product.prodname_copilot_chat_short %} can help you avoid code that causes slow or blocked database operations, or tables with missing or incorrect data.'
5+
redirect_from:
6+
- /copilot/example-prompts-for-github-copilot-chat/refactoring-code/fixing-database-deadlocks-or-data-integrity-issues
57
versions:
68
feature: copilot
79
category:

content/copilot/example-prompts-for-github-copilot-chat/refactoring-code/fixing-lint-errors.md content/copilot/copilot-chat-cookbook/refactoring-code/fixing-lint-errors.md

+2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
title: Fixing lint errors
33
shortTitle: Lint errors
44
intro: '{% data variables.product.prodname_copilot_chat_short %} can suggest ways to fix issues identified by a code linter.'
5+
redirect_from:
6+
- /copilot/example-prompts-for-github-copilot-chat/refactoring-code/fixing-lint-errors
57
versions:
68
feature: copilot
79
category:
+2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
title: Handling cross-cutting concerns
33
shortTitle: Cross-cutting concerns
44
intro: '{% data variables.product.prodname_copilot_chat_short %} can help you avoid code that relates to a concern other than the core concern of the method or function in which the code is located.'
5+
redirect_from:
6+
- /copilot/example-prompts-for-github-copilot-chat/refactoring-code/handling-cross-cutting-concerns
57
versions:
68
feature: copilot
79
category:
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
title: 'Improving code readability and maintainability'
33
shortTitle: Improve code readability
44
intro: '{% data variables.product.prodname_copilot_chat_short %} can suggest ways to make your code easier to understand and maintain.'
5+
redirect_from:
6+
- /copilot/example-prompts-for-github-copilot-chat/refactoring-code/improving-code-readability-and-maintainability
57
versions:
68
feature: copilot
79
category:
@@ -19,7 +21,7 @@ Code with poor readability is difficult for other developers to maintain and ext
1921
* [Reducing nested logic](#reducing-nested-logic)
2022
* [Splitting large methods into smaller, more readable ones](#splitting-up-large-methods)
2123

22-
Documenting your code is another way to improve the maintainability of your code. For information about using {% data variables.product.prodname_copilot_chat_short %} to help you add useful comments to your code, see the example prompts in [Documenting code](/copilot/example-prompts-for-github-copilot-chat/documenting-code).
24+
Documenting your code is another way to improve the maintainability of your code. For information about using {% data variables.product.prodname_copilot_chat_short %} to help you add useful comments to your code, see the example prompts in [Documenting code](/copilot/copilot-chat-cookbook/documenting-code).
2325

2426
> [!NOTE] The responses shown in this article are examples. {% data variables.product.prodname_copilot_chat_short %} responses are non-deterministic, so you may get different responses from the ones shown here.
2527

content/copilot/example-prompts-for-github-copilot-chat/refactoring-code/index.md content/copilot/copilot-chat-cookbook/refactoring-code/index.md

+2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
---
22
title: Refactoring code
33
intro: 'Discover ways that you can use {% data variables.product.prodname_copilot %} to refactor your code.'
4+
redirect_from:
5+
- /copilot/example-prompts-for-github-copilot-chat/refactoring-code
46
versions:
57
feature: copilot
68
topics:
+2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
title: Refactoring data access layers
33
shortTitle: Data access layers
44
intro: '{% data variables.product.prodname_copilot_chat_short %} can suggest ways to decouple your data access code from your business logic, making an application easier to maintain and scale.'
5+
redirect_from:
6+
- /copilot/example-prompts-for-github-copilot-chat/refactoring-code/refactoring-data-access-layers
57
versions:
68
feature: copilot
79
category:
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
title: Refactoring for performance optimization
33
shortTitle: Performance optimization
44
intro: '{% data variables.product.prodname_copilot_chat_short %} can suggest ways to speed up slow-running code.'
5+
redirect_from:
6+
- /copilot/example-prompts-for-github-copilot-chat/refactoring-code/refactoring-for-performance-optimization
57
versions:
68
feature: copilot
79
category:
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
title: Refactoring to implement a design pattern
33
shortTitle: Design patterns
44
intro: '{% data variables.product.prodname_copilot_chat_short %} can suggest design patterns that you can use to improve your code.'
5+
redirect_from:
6+
- /copilot/example-prompts-for-github-copilot-chat/refactoring-code/refactoring-to-implement-a-design-pattern
57
versions:
68
feature: copilot
79
category:
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
title: Simplifying complex inheritance hierarchies
33
shortTitle: Simplify inheritance hierarchies
44
intro: '{% data variables.product.prodname_copilot_chat_short %} can help you to refactor code to avoid classes with multiple layers of inheritance.'
5+
redirect_from:
6+
- /copilot/example-prompts-for-github-copilot-chat/refactoring-code/simplifying-complex-inheritance-hierarchies
57
versions:
68
feature: copilot
79
category:
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
title: 'Finding existing vulnerabilities in code'
33
shortTitle: Finding vulnerabilities
44
intro: 'Copilot Chat can help find common vulnerabilities in your code and suggest fixes.'
5+
redirect_from:
6+
- /copilot/example-prompts-for-github-copilot-chat/security-analysis/finding-existing-vulnerabilities-in-code
57
versions:
68
feature: copilot
79
category:

content/copilot/example-prompts-for-github-copilot-chat/security-analysis/index.md content/copilot/copilot-chat-cookbook/security-analysis/index.md

+2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
---
22
title: Security analysis
33
intro: 'Discover ways that you can use {% data variables.product.prodname_copilot %} to improve code security.'
4+
redirect_from:
5+
- /copilot/example-prompts-for-github-copilot-chat/security-analysis
46
versions:
57
feature: copilot
68
topics:
+2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
title: 'Create end-to-end tests for a webpage'
33
shortTitle: Create end-to-end tests
44
intro: '{% data variables.product.prodname_copilot_chat_short %} can help with generating end-to-end tests.'
5+
redirect_from:
6+
- /copilot/example-prompts-for-github-copilot-chat/testing-code/create-end-to-end-tests-for-a-webpage
57
versions:
68
feature: copilot
79
category:
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
title: 'Create mock objects to abstract layers'
33
shortTitle: Create mock objects
44
intro: '{% data variables.product.prodname_copilot_chat_short %} can help with creating mock objects that you can use for unit tests.'
5+
redirect_from:
6+
- /copilot/example-prompts-for-github-copilot-chat/testing-code/create-mock-objects-to-abstract-layers
57
versions:
68
feature: copilot
79
category:

content/copilot/example-prompts-for-github-copilot-chat/testing-code/generate-unit-tests.md content/copilot/copilot-chat-cookbook/testing-code/generate-unit-tests.md

+2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
title: 'Generate unit tests'
33
shortTitle: Generate unit tests
44
intro: '{% data variables.product.prodname_copilot_chat_short %} can help with generating unit tests for a function.'
5+
redirect_from:
6+
- /copilot/example-prompts-for-github-copilot-chat/testing-code/generate-unit-tests
57
versions:
68
feature: copilot
79
category:

content/copilot/example-prompts-for-github-copilot-chat/testing-code/index.md content/copilot/copilot-chat-cookbook/testing-code/index.md

+2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
---
22
title: Testing code
33
intro: 'Discover ways that you can use {% data variables.product.prodname_copilot %} to test your code.'
4+
redirect_from:
5+
- /copilot/example-prompts-for-github-copilot-chat/testing-code
46
versions:
57
feature: copilot
68
topics:

content/copilot/index.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ featuredLinks:
1616
popular:
1717
- /copilot/using-github-copilot/best-practices-for-using-github-copilot
1818
- /copilot/using-github-copilot/prompt-engineering-for-github-copilot
19-
- /copilot/example-prompts-for-github-copilot-chat
19+
- /copilot/copilot-chat-cookbook
2020
- /copilot/using-github-copilot/getting-code-suggestions-in-your-ide-with-github-copilot
2121
- /copilot/using-github-copilot/asking-github-copilot-questions-in-your-ide
2222
- /copilot/using-github-copilot/using-github-copilot-in-the-command-line
@@ -28,7 +28,7 @@ children:
2828
- /about-github-copilot
2929
- /setting-up-github-copilot
3030
- /using-github-copilot
31-
- /example-prompts-for-github-copilot-chat
31+
- /copilot-chat-cookbook
3232
- /managing-copilot
3333
- /rolling-out-github-copilot-at-scale
3434
- /customizing-copilot

content/copilot/rolling-out-github-copilot-at-scale/driving-copilot-adoption-in-your-company.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ You can also use {% data variables.product.prodname_discussions %} to create a s
7474

7575
### Providing learning resources
7676

77-
In addition to your onboarding resources, you may want to provide a library of learning resources to help teams advance their skills with {% data variables.product.prodname_copilot_short %}. The {% data variables.product.prodname_copilot_chat_short %} Cookbook is a great place to start. The Cookbook is a collection of example prompts that you can use to learn how to ask {% data variables.product.prodname_copilot_short %} for help with a wide range of tasks. See [AUTOTITLE](/copilot/example-prompts-for-github-copilot-chat).
77+
In addition to your onboarding resources, you may want to provide a library of learning resources to help teams advance their skills with {% data variables.product.prodname_copilot_short %}. The {% data variables.product.prodname_copilot_chat_short %} Cookbook is a great place to start. The Cookbook is a collection of example prompts that you can use to learn how to ask {% data variables.product.prodname_copilot_short %} for help with a wide range of tasks. See [AUTOTITLE](/copilot/copilot-chat-cookbook).
7878

7979
### Communicating expectations
8080

content/get-started/learning-to-code/learning-to-debug-with-github-copilot.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -162,4 +162,4 @@ With these tactics, you're well equipped to start squashing bugs in your project
162162
163163
## Next steps
164164
165-
As you continue coding, you'll likely encounter specific problem scenarios and errors that are difficult to debug. For a list of potential issues and example {% data variables.product.prodname_copilot_chat_short %} prompts to fix them, see [AUTOTITLE](/copilot/example-prompts-for-github-copilot-chat/debugging-errors).
165+
As you continue coding, you'll likely encounter specific problem scenarios and errors that are difficult to debug. For a list of potential issues and example {% data variables.product.prodname_copilot_chat_short %} prompts to fix them, see [AUTOTITLE](/copilot/copilot-chat-cookbook/debugging-errors).

content/index.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ childGroups:
106106
- copilot
107107
- copilot/using-github-copilot/getting-code-suggestions-in-your-ide-with-github-copilot
108108
- copilot/using-github-copilot/prompt-engineering-for-github-copilot
109-
- copilot/example-prompts-for-github-copilot-chat
109+
- copilot/copilot-chat-cookbook
110110
- copilot/using-github-copilot/asking-github-copilot-questions-in-github
111111
- copilot/using-github-copilot/guides-on-using-github-copilot/refactoring-code-with-github-copilot
112112
- name: CI/CD and DevOps

0 commit comments

Comments
 (0)