Skip to content

Commit

Permalink
Merge pull request #36208 from github/repo-sync
Browse files Browse the repository at this point in the history
Repo sync
  • Loading branch information
docs-bot authored Feb 7, 2025
2 parents 308b928 + e582062 commit be5d7c7
Show file tree
Hide file tree
Showing 48 changed files with 54 additions and 107 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -109,4 +109,4 @@ If you want to improve your profile even more, incorporate these practices into

## Further reading

* [AUTOTITLE](/copilot/copilot-chat-cookbook/refactoring-code/improving-code-readability-and-maintainability)
* [AUTOTITLE](/copilot/example-prompts-for-github-copilot-chat/refactoring-code/improving-code-readability-and-maintainability)
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ To configure SAML SSO for your {% data variables.enterprise.prodname_emu_enterpr

After you configure SAML SSO for {% data variables.product.prodname_emus %} on your IdP, you can configure your enterprise on {% data variables.product.github %}.

After the initial configuration of SAML SSO, the only setting you can update on {% data variables.product.github %} for your existing SAML configuration is the SAML certificate. If you need to update the sign-on URL or issuer URL, you must first disable SAML SSO, then reconfigure SAML SSO with the new settings. For more information, see [AUTOTITLE](/admin/identity-and-access-management/configuring-authentication-for-enterprise-managed-users/disabling-authentication-for-enterprise-managed-users).
After the initial configuration of SAML SSO, the only setting you can update on {% data variables.product.github %} for your existing SAML configuration is the SAML certificate, which can be done by any member with the enterprise owner role. If you need to update the sign-on URL or issuer URL, you must first disable SAML SSO, then reconfigure SAML SSO with the new settings. For more information, see [AUTOTITLE](/admin/identity-and-access-management/configuring-authentication-for-enterprise-managed-users/disabling-authentication-for-enterprise-managed-users).

{% data reusables.emus.sign-in-as-setup-user %}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
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:
Expand Down Expand Up @@ -54,7 +52,7 @@ Below is the JSON data that caused the error:

{% data reusables.copilot.example-prompts.response-is-an-example %}

{% data variables.product.prodname_copilot_short %} might suggest that your JSON is invalid because it is missing a closing quote for the `conditions` value. Here is the corrected JSON:
{% data variables.product.prodname_copilot_short %} might suggest that your JSON is invalid because it's missing a closing quote for the `conditions` value. Here is the corrected JSON:

```json
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
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:
Expand Down Expand Up @@ -34,7 +32,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
```
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
---
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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
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:
Expand Down Expand Up @@ -61,8 +59,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
Expand Down Expand Up @@ -136,8 +134,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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
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:
Expand Down Expand Up @@ -62,8 +60,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
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
---
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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
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:
Expand All @@ -24,14 +22,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}
*/
Expand Down Expand Up @@ -67,16 +65,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}
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ 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:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
---
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:
- Copilot
children:
- /exploring-potential-feature-implementations
- /analyzing-and-incorporating-user-feedback
---
---
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
---
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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
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:
Expand All @@ -21,7 +19,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/copilot-chat-cookbook/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/example-prompts-for-github-copilot-chat/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.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
---
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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
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:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
---
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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
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:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
---
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:
Expand Down
4 changes: 2 additions & 2 deletions content/copilot/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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/copilot-chat-cookbook
- /copilot/example-prompts-for-github-copilot-chat
- /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
Expand All @@ -28,7 +28,7 @@ children:
- /about-github-copilot
- /setting-up-github-copilot
- /using-github-copilot
- /copilot-chat-cookbook
- /example-prompts-for-github-copilot-chat
- /managing-copilot
- /rolling-out-github-copilot-at-scale
- /customizing-copilot
Expand Down
Loading

0 comments on commit be5d7c7

Please sign in to comment.