diff --git a/content/account-and-profile/setting-up-and-managing-your-github-profile/customizing-your-profile/using-your-github-profile-to-enhance-your-resume.md b/content/account-and-profile/setting-up-and-managing-your-github-profile/customizing-your-profile/using-your-github-profile-to-enhance-your-resume.md index 1358d388158e..04d29dc0bfe5 100644 --- a/content/account-and-profile/setting-up-and-managing-your-github-profile/customizing-your-profile/using-your-github-profile-to-enhance-your-resume.md +++ b/content/account-and-profile/setting-up-and-managing-your-github-profile/customizing-your-profile/using-your-github-profile-to-enhance-your-resume.md @@ -109,4 +109,4 @@ If you want to improve your profile even more, incorporate these practices into ## Further reading -* [AUTOTITLE](/copilot/example-prompts-for-github-copilot-chat/refactoring-code/improving-code-readability-and-maintainability) +* [AUTOTITLE](/copilot/copilot-chat-cookbook/refactoring-code/improving-code-readability-and-maintainability) diff --git a/content/copilot/example-prompts-for-github-copilot-chat/debugging-errors/debugging-invalid-json.md b/content/copilot/copilot-chat-cookbook/debugging-errors/debugging-invalid-json.md similarity index 95% rename from content/copilot/example-prompts-for-github-copilot-chat/debugging-errors/debugging-invalid-json.md rename to content/copilot/copilot-chat-cookbook/debugging-errors/debugging-invalid-json.md index f5475eb52283..f823e0d2a501 100644 --- a/content/copilot/example-prompts-for-github-copilot-chat/debugging-errors/debugging-invalid-json.md +++ b/content/copilot/copilot-chat-cookbook/debugging-errors/debugging-invalid-json.md @@ -2,6 +2,8 @@ title: Debugging invalid JSON shortTitle: Debug invalid JSON intro: '{% data variables.product.prodname_copilot_chat_short %} can identify and resolve syntax errors or structural issues in JSON data.' +redirect_from: + - /copilot/example-prompts-for-github-copilot-chat/debugging-errors/debugging-invalid-json versions: feature: copilot category: diff --git a/content/copilot/example-prompts-for-github-copilot-chat/debugging-errors/handling-api-rate-limits.md b/content/copilot/copilot-chat-cookbook/debugging-errors/handling-api-rate-limits.md similarity index 95% rename from content/copilot/example-prompts-for-github-copilot-chat/debugging-errors/handling-api-rate-limits.md rename to content/copilot/copilot-chat-cookbook/debugging-errors/handling-api-rate-limits.md index 325b6347a0c4..f351289ab774 100644 --- a/content/copilot/example-prompts-for-github-copilot-chat/debugging-errors/handling-api-rate-limits.md +++ b/content/copilot/copilot-chat-cookbook/debugging-errors/handling-api-rate-limits.md @@ -2,6 +2,8 @@ title: Handling API rate limits shortTitle: Handle API rate limits intro: '{% data variables.product.prodname_copilot_chat_short %} can help handle API rate limits by suggesting code that detects implements retry logic.' +redirect_from: + - /copilot/example-prompts-for-github-copilot-chat/debugging-errors/handling-api-rate-limits versions: feature: copilot category: @@ -32,7 +34,7 @@ def get_weather(): city = request.args.get('city') # Simulate an API request to the external weather service response = requests.get(WEATHER_API_URL, params={"city": city}) - weather_data = response.json() + weather_data = response.json() return weather_data ``` diff --git a/content/copilot/example-prompts-for-github-copilot-chat/debugging-errors/index.md b/content/copilot/copilot-chat-cookbook/debugging-errors/index.md similarity index 76% rename from content/copilot/example-prompts-for-github-copilot-chat/debugging-errors/index.md rename to content/copilot/copilot-chat-cookbook/debugging-errors/index.md index 9aa2cba614a3..a494da03c22b 100644 --- a/content/copilot/example-prompts-for-github-copilot-chat/debugging-errors/index.md +++ b/content/copilot/copilot-chat-cookbook/debugging-errors/index.md @@ -1,6 +1,8 @@ --- title: Debugging errors intro: 'Discover ways that you can use {% data variables.product.prodname_copilot %} to debug errors during development.' +redirect_from: + - /copilot/example-prompts-for-github-copilot-chat/debugging-errors versions: feature: copilot topics: diff --git a/content/copilot/example-prompts-for-github-copilot-chat/documenting-code/documenting-legacy-code.md b/content/copilot/copilot-chat-cookbook/documenting-code/documenting-legacy-code.md similarity index 94% rename from content/copilot/example-prompts-for-github-copilot-chat/documenting-code/documenting-legacy-code.md rename to content/copilot/copilot-chat-cookbook/documenting-code/documenting-legacy-code.md index 19d291ea5c97..98752cd69a2e 100644 --- a/content/copilot/example-prompts-for-github-copilot-chat/documenting-code/documenting-legacy-code.md +++ b/content/copilot/copilot-chat-cookbook/documenting-code/documenting-legacy-code.md @@ -2,6 +2,8 @@ title: 'Documenting legacy code' shortTitle: Document legacy code intro: '{% data variables.product.prodname_copilot_chat_short %} can help with documenting legacy code.' +redirect_from: + - /copilot/example-prompts-for-github-copilot-chat/documenting-code/documenting-legacy-code versions: feature: copilot category: @@ -59,8 +61,8 @@ INSERT-AND-VALIDATE. ELSE EXEC SQL ROLLBACK END-EXEC SET FAILED TO TRUE - STRING "DB Error: " SQLCODE - DELIMITED BY SIZE + STRING "DB Error: " SQLCODE + DELIMITED BY SIZE INTO WS-ERROR-MSG DISPLAY WS-ERROR-MSG END-IF @@ -134,8 +136,8 @@ For example: ELSE EXEC SQL ROLLBACK END-EXEC *> Rollback if failed SET FAILED TO TRUE - STRING "DB Error: " SQLCODE - DELIMITED BY SIZE + STRING "DB Error: " SQLCODE + DELIMITED BY SIZE INTO WS-ERROR-MSG DISPLAY WS-ERROR-MSG END-IF diff --git a/content/copilot/example-prompts-for-github-copilot-chat/documenting-code/explaining-complex-algorithms-or-logic.md b/content/copilot/copilot-chat-cookbook/documenting-code/explaining-complex-algorithms-or-logic.md similarity index 98% rename from content/copilot/example-prompts-for-github-copilot-chat/documenting-code/explaining-complex-algorithms-or-logic.md rename to content/copilot/copilot-chat-cookbook/documenting-code/explaining-complex-algorithms-or-logic.md index 47f451334bcc..2ed0c08f8dd3 100644 --- a/content/copilot/example-prompts-for-github-copilot-chat/documenting-code/explaining-complex-algorithms-or-logic.md +++ b/content/copilot/copilot-chat-cookbook/documenting-code/explaining-complex-algorithms-or-logic.md @@ -2,6 +2,8 @@ title: 'Explaining complex algorithms or logic' shortTitle: Explain complex logic intro: '{% data variables.product.prodname_copilot_chat_short %} can help add clear and concise documentation on complex algorithms or logic.' +redirect_from: + - /copilot/example-prompts-for-github-copilot-chat/documenting-code/explaining-complex-algorithms-or-logic versions: feature: copilot category: diff --git a/content/copilot/example-prompts-for-github-copilot-chat/documenting-code/explaining-legacy-code.md b/content/copilot/copilot-chat-cookbook/documenting-code/explaining-legacy-code.md similarity index 95% rename from content/copilot/example-prompts-for-github-copilot-chat/documenting-code/explaining-legacy-code.md rename to content/copilot/copilot-chat-cookbook/documenting-code/explaining-legacy-code.md index d4ca8fabc467..ff8c79005197 100644 --- a/content/copilot/example-prompts-for-github-copilot-chat/documenting-code/explaining-legacy-code.md +++ b/content/copilot/copilot-chat-cookbook/documenting-code/explaining-legacy-code.md @@ -2,6 +2,8 @@ title: 'Explaining legacy code' shortTitle: Explain legacy code intro: '{% data variables.product.prodname_copilot_chat_short %} can help with explaining unfamiliar code.' +redirect_from: + - /copilot/example-prompts-for-github-copilot-chat/documenting-code/explaining-legacy-code versions: feature: copilot category: @@ -60,8 +62,8 @@ INSERT-AND-VALIDATE. ELSE EXEC SQL ROLLBACK END-EXEC SET FAILED TO TRUE - STRING "DB Error: " SQLCODE - DELIMITED BY SIZE + STRING "DB Error: " SQLCODE + DELIMITED BY SIZE INTO WS-ERROR-MSG DISPLAY WS-ERROR-MSG END-IF diff --git a/content/copilot/example-prompts-for-github-copilot-chat/documenting-code/index.md b/content/copilot/copilot-chat-cookbook/documenting-code/index.md similarity index 80% rename from content/copilot/example-prompts-for-github-copilot-chat/documenting-code/index.md rename to content/copilot/copilot-chat-cookbook/documenting-code/index.md index 4420dd0af31b..ad5023296361 100644 --- a/content/copilot/example-prompts-for-github-copilot-chat/documenting-code/index.md +++ b/content/copilot/copilot-chat-cookbook/documenting-code/index.md @@ -1,6 +1,8 @@ --- title: Documenting code intro: 'Discover ways that you can use {% data variables.product.prodname_copilot_chat %} to document your code.' +redirect_from: + - /copilot/example-prompts-for-github-copilot-chat/documenting-code versions: feature: copilot topics: diff --git a/content/copilot/example-prompts-for-github-copilot-chat/documenting-code/syncing-documentation-with-code-changes.md b/content/copilot/copilot-chat-cookbook/documenting-code/syncing-documentation-with-code-changes.md similarity index 95% rename from content/copilot/example-prompts-for-github-copilot-chat/documenting-code/syncing-documentation-with-code-changes.md rename to content/copilot/copilot-chat-cookbook/documenting-code/syncing-documentation-with-code-changes.md index 41b35af800fb..0f4831efecff 100644 --- a/content/copilot/example-prompts-for-github-copilot-chat/documenting-code/syncing-documentation-with-code-changes.md +++ b/content/copilot/copilot-chat-cookbook/documenting-code/syncing-documentation-with-code-changes.md @@ -2,6 +2,8 @@ title: 'Syncing documentation with code changes' shortTitle: Sync documentation intro: '{% data variables.product.prodname_copilot_chat_short %} can help with keeping code documentation up-to-date.' +redirect_from: + - /copilot/example-prompts-for-github-copilot-chat/documenting-code/syncing-documentation-with-code-changes versions: feature: copilot category: @@ -22,14 +24,14 @@ It can be difficult to keep documentation up to date with changes to code. Howev ```typescript /** * Retrieves all products belonging to a specific category. - * + * * @param categoryId - The unique identifier of the product category * @returns Promise that resolves to an array of Product objects - * + * * @example * const products = await getByCategoryName(5); * // Returns: [{id: 1, name: "Product 1", categoryId: 5}, ...] - * + * * @throws {PrismaClientKnownRequestError} If database query fails * @see {@link https://www.prisma.io/docs/reference/api-reference/prisma-client-reference#findmany} */ @@ -65,16 +67,16 @@ For example: ```typescript /** * Retrieves all products belonging to a specific category with pagination and recent reviews. - * + * * @param categoryId - The unique identifier of the product category * @param page - The page number for pagination (default: 1) * @param pageSize - Number of products per page (default: 10) * @returns Promise that resolves to an array of Product objects with their 5 most recent reviews - * + * * @example * const products = await getByCategoryName(5, 2, 20); * // Returns: [{id: 1, name: "Product 1", categoryId: 5, reviews: [...5 recent reviews]}, ...] - * + * * @throws {PrismaClientKnownRequestError} If database query fails * @see {@link https://www.prisma.io/docs/reference/api-reference/prisma-client-reference#findmany} */ diff --git a/content/copilot/example-prompts-for-github-copilot-chat/functionality-analysis-and-feature-suggestions/analyzing-and-incorporating-user-feedback.md b/content/copilot/copilot-chat-cookbook/functionality-analysis-and-feature-suggestions/analyzing-and-incorporating-user-feedback.md similarity index 96% rename from content/copilot/example-prompts-for-github-copilot-chat/functionality-analysis-and-feature-suggestions/analyzing-and-incorporating-user-feedback.md rename to content/copilot/copilot-chat-cookbook/functionality-analysis-and-feature-suggestions/analyzing-and-incorporating-user-feedback.md index 78e2c5eb33bc..33dcaff891be 100644 --- a/content/copilot/example-prompts-for-github-copilot-chat/functionality-analysis-and-feature-suggestions/analyzing-and-incorporating-user-feedback.md +++ b/content/copilot/copilot-chat-cookbook/functionality-analysis-and-feature-suggestions/analyzing-and-incorporating-user-feedback.md @@ -2,6 +2,8 @@ title: 'Analyzing and incorporating user feedback' shortTitle: Incorporate feedback intro: '{% data variables.product.prodname_copilot_chat_short %} can enhance the process of incorporating user feedback into your project.' +redirect_from: + - /copilot/example-prompts-for-github-copilot-chat/functionality-analysis-and-feature-suggestions/analyzing-and-incorporating-user-feedback versions: feature: copilot category: diff --git a/content/copilot/example-prompts-for-github-copilot-chat/functionality-analysis-and-feature-suggestions/exploring-potential-feature-implementations.md b/content/copilot/copilot-chat-cookbook/functionality-analysis-and-feature-suggestions/exploring-potential-feature-implementations.md similarity index 97% rename from content/copilot/example-prompts-for-github-copilot-chat/functionality-analysis-and-feature-suggestions/exploring-potential-feature-implementations.md rename to content/copilot/copilot-chat-cookbook/functionality-analysis-and-feature-suggestions/exploring-potential-feature-implementations.md index 7ac15c3efa49..14d9ff891885 100644 --- a/content/copilot/example-prompts-for-github-copilot-chat/functionality-analysis-and-feature-suggestions/exploring-potential-feature-implementations.md +++ b/content/copilot/copilot-chat-cookbook/functionality-analysis-and-feature-suggestions/exploring-potential-feature-implementations.md @@ -4,6 +4,8 @@ shortTitle: Explore feature implementations intro: >- {% data variables.product.prodname_copilot_chat_short %} can help explore different approaches for implementing a single feature. +redirect_from: + - /copilot/example-prompts-for-github-copilot-chat/functionality-analysis-and-feature-suggestions/exploring-potential-feature-implementations versions: feature: copilot category: diff --git a/content/copilot/example-prompts-for-github-copilot-chat/functionality-analysis-and-feature-suggestions/index.md b/content/copilot/copilot-chat-cookbook/functionality-analysis-and-feature-suggestions/index.md similarity index 74% rename from content/copilot/example-prompts-for-github-copilot-chat/functionality-analysis-and-feature-suggestions/index.md rename to content/copilot/copilot-chat-cookbook/functionality-analysis-and-feature-suggestions/index.md index 068fc9a6c37b..9204e636ab68 100644 --- a/content/copilot/example-prompts-for-github-copilot-chat/functionality-analysis-and-feature-suggestions/index.md +++ b/content/copilot/copilot-chat-cookbook/functionality-analysis-and-feature-suggestions/index.md @@ -1,6 +1,8 @@ --- title: Functionality analysis and feature suggestions intro: 'Discover ways that you can use {% data variables.product.prodname_copilot %} to improve the functionality of your project.' +redirect_from: + - /copilot/example-prompts-for-github-copilot-chat/functionality-analysis-and-feature-suggestions versions: feature: copilot topics: @@ -8,4 +10,4 @@ topics: children: - /exploring-potential-feature-implementations - /analyzing-and-incorporating-user-feedback ---- \ No newline at end of file +--- diff --git a/content/copilot/example-prompts-for-github-copilot-chat/index.md b/content/copilot/copilot-chat-cookbook/index.md similarity index 85% rename from content/copilot/example-prompts-for-github-copilot-chat/index.md rename to content/copilot/copilot-chat-cookbook/index.md index 2fb90226ff01..850f1e2bb120 100644 --- a/content/copilot/example-prompts-for-github-copilot-chat/index.md +++ b/content/copilot/copilot-chat-cookbook/index.md @@ -1,8 +1,9 @@ --- title: Copilot Chat Cookbook -shortTitle: Example prompts intro: 'Find examples of prompts to use with {% data variables.product.prodname_copilot_chat %}.' allowTitleToDifferFromFilename: true +redirect_from: + - /copilot/example-prompts-for-github-copilot-chat versions: feature: copilot topics: diff --git a/content/copilot/example-prompts-for-github-copilot-chat/refactoring-code/decoupling-business-logic-from-ui-components.md b/content/copilot/copilot-chat-cookbook/refactoring-code/decoupling-business-logic-from-ui-components.md similarity index 96% rename from content/copilot/example-prompts-for-github-copilot-chat/refactoring-code/decoupling-business-logic-from-ui-components.md rename to content/copilot/copilot-chat-cookbook/refactoring-code/decoupling-business-logic-from-ui-components.md index c74b38a08192..fa297c30c34b 100644 --- a/content/copilot/example-prompts-for-github-copilot-chat/refactoring-code/decoupling-business-logic-from-ui-components.md +++ b/content/copilot/copilot-chat-cookbook/refactoring-code/decoupling-business-logic-from-ui-components.md @@ -2,6 +2,8 @@ title: Decoupling business logic from UI components shortTitle: Decoupling business logic 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.' +redirect_from: + - /copilot/example-prompts-for-github-copilot-chat/refactoring-code/decoupling-business-logic-from-ui-components versions: feature: copilot category: diff --git a/content/copilot/example-prompts-for-github-copilot-chat/refactoring-code/fixing-database-deadlocks-or-data-integrity-issues.md b/content/copilot/copilot-chat-cookbook/refactoring-code/fixing-database-deadlocks-or-data-integrity-issues.md similarity index 98% rename from content/copilot/example-prompts-for-github-copilot-chat/refactoring-code/fixing-database-deadlocks-or-data-integrity-issues.md rename to content/copilot/copilot-chat-cookbook/refactoring-code/fixing-database-deadlocks-or-data-integrity-issues.md index 9e0bcce4a3ea..795965710d60 100644 --- a/content/copilot/example-prompts-for-github-copilot-chat/refactoring-code/fixing-database-deadlocks-or-data-integrity-issues.md +++ b/content/copilot/copilot-chat-cookbook/refactoring-code/fixing-database-deadlocks-or-data-integrity-issues.md @@ -2,6 +2,8 @@ title: 'Fixing database deadlocks or data integrity issues' shortTitle: Fixing database deadlocks 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.' +redirect_from: + - /copilot/example-prompts-for-github-copilot-chat/refactoring-code/fixing-database-deadlocks-or-data-integrity-issues versions: feature: copilot category: diff --git a/content/copilot/example-prompts-for-github-copilot-chat/refactoring-code/fixing-lint-errors.md b/content/copilot/copilot-chat-cookbook/refactoring-code/fixing-lint-errors.md similarity index 96% rename from content/copilot/example-prompts-for-github-copilot-chat/refactoring-code/fixing-lint-errors.md rename to content/copilot/copilot-chat-cookbook/refactoring-code/fixing-lint-errors.md index 3058ba0ac0fb..9b7e6dd2f58e 100644 --- a/content/copilot/example-prompts-for-github-copilot-chat/refactoring-code/fixing-lint-errors.md +++ b/content/copilot/copilot-chat-cookbook/refactoring-code/fixing-lint-errors.md @@ -2,6 +2,8 @@ title: Fixing lint errors shortTitle: Lint errors intro: '{% data variables.product.prodname_copilot_chat_short %} can suggest ways to fix issues identified by a code linter.' +redirect_from: + - /copilot/example-prompts-for-github-copilot-chat/refactoring-code/fixing-lint-errors versions: feature: copilot category: diff --git a/content/copilot/example-prompts-for-github-copilot-chat/refactoring-code/handling-cross-cutting-concerns.md b/content/copilot/copilot-chat-cookbook/refactoring-code/handling-cross-cutting-concerns.md similarity index 98% rename from content/copilot/example-prompts-for-github-copilot-chat/refactoring-code/handling-cross-cutting-concerns.md rename to content/copilot/copilot-chat-cookbook/refactoring-code/handling-cross-cutting-concerns.md index 35cbfac287ac..ce6120207e29 100644 --- a/content/copilot/example-prompts-for-github-copilot-chat/refactoring-code/handling-cross-cutting-concerns.md +++ b/content/copilot/copilot-chat-cookbook/refactoring-code/handling-cross-cutting-concerns.md @@ -2,6 +2,8 @@ title: Handling cross-cutting concerns shortTitle: Cross-cutting concerns 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.' +redirect_from: + - /copilot/example-prompts-for-github-copilot-chat/refactoring-code/handling-cross-cutting-concerns versions: feature: copilot category: diff --git a/content/copilot/example-prompts-for-github-copilot-chat/refactoring-code/improving-code-readability-and-maintainability.md b/content/copilot/copilot-chat-cookbook/refactoring-code/improving-code-readability-and-maintainability.md similarity index 97% rename from content/copilot/example-prompts-for-github-copilot-chat/refactoring-code/improving-code-readability-and-maintainability.md rename to content/copilot/copilot-chat-cookbook/refactoring-code/improving-code-readability-and-maintainability.md index cfaa08014783..89caf4c02e70 100644 --- a/content/copilot/example-prompts-for-github-copilot-chat/refactoring-code/improving-code-readability-and-maintainability.md +++ b/content/copilot/copilot-chat-cookbook/refactoring-code/improving-code-readability-and-maintainability.md @@ -2,6 +2,8 @@ title: 'Improving code readability and maintainability' shortTitle: Improve code readability intro: '{% data variables.product.prodname_copilot_chat_short %} can suggest ways to make your code easier to understand and maintain.' +redirect_from: + - /copilot/example-prompts-for-github-copilot-chat/refactoring-code/improving-code-readability-and-maintainability versions: feature: copilot category: @@ -19,7 +21,7 @@ Code with poor readability is difficult for other developers to maintain and ext * [Reducing nested logic](#reducing-nested-logic) * [Splitting large methods into smaller, more readable ones](#splitting-up-large-methods) -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). +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). > [!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. diff --git a/content/copilot/example-prompts-for-github-copilot-chat/refactoring-code/index.md b/content/copilot/copilot-chat-cookbook/refactoring-code/index.md similarity index 87% rename from content/copilot/example-prompts-for-github-copilot-chat/refactoring-code/index.md rename to content/copilot/copilot-chat-cookbook/refactoring-code/index.md index 7dd927dfb341..c96f15084a67 100644 --- a/content/copilot/example-prompts-for-github-copilot-chat/refactoring-code/index.md +++ b/content/copilot/copilot-chat-cookbook/refactoring-code/index.md @@ -1,6 +1,8 @@ --- title: Refactoring code intro: 'Discover ways that you can use {% data variables.product.prodname_copilot %} to refactor your code.' +redirect_from: + - /copilot/example-prompts-for-github-copilot-chat/refactoring-code versions: feature: copilot topics: diff --git a/content/copilot/example-prompts-for-github-copilot-chat/refactoring-code/refactoring-data-access-layers.md b/content/copilot/copilot-chat-cookbook/refactoring-code/refactoring-data-access-layers.md similarity index 97% rename from content/copilot/example-prompts-for-github-copilot-chat/refactoring-code/refactoring-data-access-layers.md rename to content/copilot/copilot-chat-cookbook/refactoring-code/refactoring-data-access-layers.md index c33696d9d25b..23a171a9a6d7 100644 --- a/content/copilot/example-prompts-for-github-copilot-chat/refactoring-code/refactoring-data-access-layers.md +++ b/content/copilot/copilot-chat-cookbook/refactoring-code/refactoring-data-access-layers.md @@ -2,6 +2,8 @@ title: Refactoring data access layers shortTitle: Data access layers 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.' +redirect_from: + - /copilot/example-prompts-for-github-copilot-chat/refactoring-code/refactoring-data-access-layers versions: feature: copilot category: diff --git a/content/copilot/example-prompts-for-github-copilot-chat/refactoring-code/refactoring-for-performance-optimization.md b/content/copilot/copilot-chat-cookbook/refactoring-code/refactoring-for-performance-optimization.md similarity index 96% rename from content/copilot/example-prompts-for-github-copilot-chat/refactoring-code/refactoring-for-performance-optimization.md rename to content/copilot/copilot-chat-cookbook/refactoring-code/refactoring-for-performance-optimization.md index 540149310a63..decbbf2347d1 100644 --- a/content/copilot/example-prompts-for-github-copilot-chat/refactoring-code/refactoring-for-performance-optimization.md +++ b/content/copilot/copilot-chat-cookbook/refactoring-code/refactoring-for-performance-optimization.md @@ -2,6 +2,8 @@ title: Refactoring for performance optimization shortTitle: Performance optimization intro: '{% data variables.product.prodname_copilot_chat_short %} can suggest ways to speed up slow-running code.' +redirect_from: + - /copilot/example-prompts-for-github-copilot-chat/refactoring-code/refactoring-for-performance-optimization versions: feature: copilot category: diff --git a/content/copilot/example-prompts-for-github-copilot-chat/refactoring-code/refactoring-to-implement-a-design-pattern.md b/content/copilot/copilot-chat-cookbook/refactoring-code/refactoring-to-implement-a-design-pattern.md similarity index 96% rename from content/copilot/example-prompts-for-github-copilot-chat/refactoring-code/refactoring-to-implement-a-design-pattern.md rename to content/copilot/copilot-chat-cookbook/refactoring-code/refactoring-to-implement-a-design-pattern.md index 9cf6ebbd8a4f..460210656ada 100644 --- a/content/copilot/example-prompts-for-github-copilot-chat/refactoring-code/refactoring-to-implement-a-design-pattern.md +++ b/content/copilot/copilot-chat-cookbook/refactoring-code/refactoring-to-implement-a-design-pattern.md @@ -2,6 +2,8 @@ title: Refactoring to implement a design pattern shortTitle: Design patterns intro: '{% data variables.product.prodname_copilot_chat_short %} can suggest design patterns that you can use to improve your code.' +redirect_from: + - /copilot/example-prompts-for-github-copilot-chat/refactoring-code/refactoring-to-implement-a-design-pattern versions: feature: copilot category: diff --git a/content/copilot/example-prompts-for-github-copilot-chat/refactoring-code/simplifying-complex-inheritance-hierarchies.md b/content/copilot/copilot-chat-cookbook/refactoring-code/simplifying-complex-inheritance-hierarchies.md similarity index 96% rename from content/copilot/example-prompts-for-github-copilot-chat/refactoring-code/simplifying-complex-inheritance-hierarchies.md rename to content/copilot/copilot-chat-cookbook/refactoring-code/simplifying-complex-inheritance-hierarchies.md index 8e29dd1f9bab..b591c8842ae7 100644 --- a/content/copilot/example-prompts-for-github-copilot-chat/refactoring-code/simplifying-complex-inheritance-hierarchies.md +++ b/content/copilot/copilot-chat-cookbook/refactoring-code/simplifying-complex-inheritance-hierarchies.md @@ -2,6 +2,8 @@ title: Simplifying complex inheritance hierarchies shortTitle: Simplify inheritance hierarchies intro: '{% data variables.product.prodname_copilot_chat_short %} can help you to refactor code to avoid classes with multiple layers of inheritance.' +redirect_from: + - /copilot/example-prompts-for-github-copilot-chat/refactoring-code/simplifying-complex-inheritance-hierarchies versions: feature: copilot category: diff --git a/content/copilot/example-prompts-for-github-copilot-chat/security-analysis/finding-existing-vulnerabilities-in-code.md b/content/copilot/copilot-chat-cookbook/security-analysis/finding-existing-vulnerabilities-in-code.md similarity index 95% rename from content/copilot/example-prompts-for-github-copilot-chat/security-analysis/finding-existing-vulnerabilities-in-code.md rename to content/copilot/copilot-chat-cookbook/security-analysis/finding-existing-vulnerabilities-in-code.md index 79a5ff83e2a1..90a6da8b3c7a 100644 --- a/content/copilot/example-prompts-for-github-copilot-chat/security-analysis/finding-existing-vulnerabilities-in-code.md +++ b/content/copilot/copilot-chat-cookbook/security-analysis/finding-existing-vulnerabilities-in-code.md @@ -2,6 +2,8 @@ title: 'Finding existing vulnerabilities in code' shortTitle: Finding vulnerabilities intro: 'Copilot Chat can help find common vulnerabilities in your code and suggest fixes.' +redirect_from: + - /copilot/example-prompts-for-github-copilot-chat/security-analysis/finding-existing-vulnerabilities-in-code versions: feature: copilot category: diff --git a/content/copilot/example-prompts-for-github-copilot-chat/security-analysis/index.md b/content/copilot/copilot-chat-cookbook/security-analysis/index.md similarity index 74% rename from content/copilot/example-prompts-for-github-copilot-chat/security-analysis/index.md rename to content/copilot/copilot-chat-cookbook/security-analysis/index.md index 3c9929805af4..a21df02ce2cc 100644 --- a/content/copilot/example-prompts-for-github-copilot-chat/security-analysis/index.md +++ b/content/copilot/copilot-chat-cookbook/security-analysis/index.md @@ -1,6 +1,8 @@ --- title: Security analysis intro: 'Discover ways that you can use {% data variables.product.prodname_copilot %} to improve code security.' +redirect_from: + - /copilot/example-prompts-for-github-copilot-chat/security-analysis versions: feature: copilot topics: diff --git a/content/copilot/example-prompts-for-github-copilot-chat/testing-code/create-end-to-end-tests-for-a-webpage.md b/content/copilot/copilot-chat-cookbook/testing-code/create-end-to-end-tests-for-a-webpage.md similarity index 97% rename from content/copilot/example-prompts-for-github-copilot-chat/testing-code/create-end-to-end-tests-for-a-webpage.md rename to content/copilot/copilot-chat-cookbook/testing-code/create-end-to-end-tests-for-a-webpage.md index c68a6fedad14..c96a4373c354 100644 --- a/content/copilot/example-prompts-for-github-copilot-chat/testing-code/create-end-to-end-tests-for-a-webpage.md +++ b/content/copilot/copilot-chat-cookbook/testing-code/create-end-to-end-tests-for-a-webpage.md @@ -2,6 +2,8 @@ title: 'Create end-to-end tests for a webpage' shortTitle: Create end-to-end tests intro: '{% data variables.product.prodname_copilot_chat_short %} can help with generating end-to-end tests.' +redirect_from: + - /copilot/example-prompts-for-github-copilot-chat/testing-code/create-end-to-end-tests-for-a-webpage versions: feature: copilot category: diff --git a/content/copilot/example-prompts-for-github-copilot-chat/testing-code/create-mock-objects-to-abstract-layers.md b/content/copilot/copilot-chat-cookbook/testing-code/create-mock-objects-to-abstract-layers.md similarity index 96% rename from content/copilot/example-prompts-for-github-copilot-chat/testing-code/create-mock-objects-to-abstract-layers.md rename to content/copilot/copilot-chat-cookbook/testing-code/create-mock-objects-to-abstract-layers.md index deeea98cb668..aa49070b9021 100644 --- a/content/copilot/example-prompts-for-github-copilot-chat/testing-code/create-mock-objects-to-abstract-layers.md +++ b/content/copilot/copilot-chat-cookbook/testing-code/create-mock-objects-to-abstract-layers.md @@ -2,6 +2,8 @@ title: 'Create mock objects to abstract layers' shortTitle: Create mock objects intro: '{% data variables.product.prodname_copilot_chat_short %} can help with creating mock objects that you can use for unit tests.' +redirect_from: + - /copilot/example-prompts-for-github-copilot-chat/testing-code/create-mock-objects-to-abstract-layers versions: feature: copilot category: diff --git a/content/copilot/example-prompts-for-github-copilot-chat/testing-code/generate-unit-tests.md b/content/copilot/copilot-chat-cookbook/testing-code/generate-unit-tests.md similarity index 96% rename from content/copilot/example-prompts-for-github-copilot-chat/testing-code/generate-unit-tests.md rename to content/copilot/copilot-chat-cookbook/testing-code/generate-unit-tests.md index 2879d26f9e7d..78807ed9f04e 100644 --- a/content/copilot/example-prompts-for-github-copilot-chat/testing-code/generate-unit-tests.md +++ b/content/copilot/copilot-chat-cookbook/testing-code/generate-unit-tests.md @@ -2,6 +2,8 @@ title: 'Generate unit tests' shortTitle: Generate unit tests intro: '{% data variables.product.prodname_copilot_chat_short %} can help with generating unit tests for a function.' +redirect_from: + - /copilot/example-prompts-for-github-copilot-chat/testing-code/generate-unit-tests versions: feature: copilot category: diff --git a/content/copilot/example-prompts-for-github-copilot-chat/testing-code/index.md b/content/copilot/copilot-chat-cookbook/testing-code/index.md similarity index 78% rename from content/copilot/example-prompts-for-github-copilot-chat/testing-code/index.md rename to content/copilot/copilot-chat-cookbook/testing-code/index.md index 00710ed0e25e..2fcd8a223d6b 100644 --- a/content/copilot/example-prompts-for-github-copilot-chat/testing-code/index.md +++ b/content/copilot/copilot-chat-cookbook/testing-code/index.md @@ -1,6 +1,8 @@ --- title: Testing code intro: 'Discover ways that you can use {% data variables.product.prodname_copilot %} to test your code.' +redirect_from: + - /copilot/example-prompts-for-github-copilot-chat/testing-code versions: feature: copilot topics: diff --git a/content/copilot/index.md b/content/copilot/index.md index af2527d18645..66d5ed48cad3 100644 --- a/content/copilot/index.md +++ b/content/copilot/index.md @@ -16,7 +16,7 @@ featuredLinks: popular: - /copilot/using-github-copilot/best-practices-for-using-github-copilot - /copilot/using-github-copilot/prompt-engineering-for-github-copilot - - /copilot/example-prompts-for-github-copilot-chat + - /copilot/copilot-chat-cookbook - /copilot/using-github-copilot/getting-code-suggestions-in-your-ide-with-github-copilot - /copilot/using-github-copilot/asking-github-copilot-questions-in-your-ide - /copilot/using-github-copilot/using-github-copilot-in-the-command-line @@ -28,7 +28,7 @@ children: - /about-github-copilot - /setting-up-github-copilot - /using-github-copilot - - /example-prompts-for-github-copilot-chat + - /copilot-chat-cookbook - /managing-copilot - /rolling-out-github-copilot-at-scale - /customizing-copilot diff --git a/content/copilot/rolling-out-github-copilot-at-scale/driving-copilot-adoption-in-your-company.md b/content/copilot/rolling-out-github-copilot-at-scale/driving-copilot-adoption-in-your-company.md index 5b73593b5ad2..397c555fdcd6 100644 --- a/content/copilot/rolling-out-github-copilot-at-scale/driving-copilot-adoption-in-your-company.md +++ b/content/copilot/rolling-out-github-copilot-at-scale/driving-copilot-adoption-in-your-company.md @@ -74,7 +74,7 @@ You can also use {% data variables.product.prodname_discussions %} to create a s ### Providing learning resources -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). +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). ### Communicating expectations diff --git a/content/get-started/learning-to-code/learning-to-debug-with-github-copilot.md b/content/get-started/learning-to-code/learning-to-debug-with-github-copilot.md index b199a6cde3bf..247895e67706 100644 --- a/content/get-started/learning-to-code/learning-to-debug-with-github-copilot.md +++ b/content/get-started/learning-to-code/learning-to-debug-with-github-copilot.md @@ -162,4 +162,4 @@ With these tactics, you're well equipped to start squashing bugs in your project ## Next steps -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). +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). diff --git a/content/index.md b/content/index.md index 361c2fe8267d..08b0e69a67fd 100644 --- a/content/index.md +++ b/content/index.md @@ -106,7 +106,7 @@ childGroups: - copilot - copilot/using-github-copilot/getting-code-suggestions-in-your-ide-with-github-copilot - copilot/using-github-copilot/prompt-engineering-for-github-copilot - - copilot/example-prompts-for-github-copilot-chat + - copilot/copilot-chat-cookbook - copilot/using-github-copilot/asking-github-copilot-questions-in-github - copilot/using-github-copilot/guides-on-using-github-copilot/refactoring-code-with-github-copilot - name: CI/CD and DevOps diff --git a/src/landings/components/CategoryLanding.tsx b/src/landings/components/CategoryLanding.tsx index 8dac7779ef31..b6d06b1a0b59 100644 --- a/src/landings/components/CategoryLanding.tsx +++ b/src/landings/components/CategoryLanding.tsx @@ -92,7 +92,7 @@ export const CategoryLanding = () => { title="Generate unit tests" description="Copilot Chat can help with generating unit tests for a function." spotlight={true} - url="/en/copilot/example-prompts-for-github-copilot-chat/testing-code/generate-unit-tests" + url="/copilot/copilot-chat-cookbook/testing-code/generate-unit-tests" tags={[]} /> </div> @@ -102,7 +102,7 @@ export const CategoryLanding = () => { title="Improving code readability and maintainability" description="Learn how to improve your code readability and maintainability." spotlight={true} - url="/en/copilot/example-prompts-for-github-copilot-chat/refactoring-code/improving-code-readability-and-maintainability" + url="/copilot/copilot-chat-cookbook/refactoring-code/improving-code-readability-and-maintainability" tags={[]} /> </div> @@ -113,7 +113,7 @@ export const CategoryLanding = () => { description="Copilot can identify and resolve syntax errors or structural issues in JSON data." spotlight={true} tags={[]} - url="/en/copilot/example-prompts-for-github-copilot-chat/debugging-errors/debugging-invalid-json" + url="/copilot/copilot-chat-cookbook/debugging-errors/debugging-invalid-json" /> </div> </div> diff --git a/src/landings/components/SidebarProduct.tsx b/src/landings/components/SidebarProduct.tsx index cc940c1b6f9c..a3b16015d6fe 100644 --- a/src/landings/components/SidebarProduct.tsx +++ b/src/landings/components/SidebarProduct.tsx @@ -79,9 +79,7 @@ function NavListItem({ childPage }: { childPage: ProductTreeNode }) { const { asPath, locale } = useRouter() const routePath = `/${locale}${asPath.split('?')[0].split('#')[0]}` const isActive = routePath === childPage.href - const specialCategory = childPage.href.endsWith( - '/copilot/example-prompts-for-github-copilot-chat', - ) + const specialCategory = childPage.href.endsWith('/copilot/copilot-chat-cookbook') return ( <NavList.Item