Skip to content

Commit

Permalink
Merge pull request #36194 from github/repo-sync
Browse files Browse the repository at this point in the history
Repo sync
  • Loading branch information
docs-bot authored Feb 6, 2025
2 parents 6ccb955 + dcc3a46 commit 092acb2
Show file tree
Hide file tree
Showing 27 changed files with 237 additions and 21 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/comment-code-changes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,11 @@ jobs:
COMMENT_BODY="<!-- CODE_CHANGES_COMMENT -->
## 🚀 Manual Deployment Required
It looks like this pull request contains code changes. To preview these changes, you will need to deploy them manually.
It looks like this pull request contains code changes. To preview these changes, please do one of:
1. [Set up a local development environment](https://github.com/github/docs/blob/main/contributing/development.md).
1. [Spin up a codespace to review](https://github.com/github/docs-engineering/blob/main/docs/team-practices/use-a-codespace-to-review.md).
1. Message \`#docs-engineering\` on Slack for a staging server.
Thank you for your contribution!"
fi
Expand Down
32 changes: 30 additions & 2 deletions .github/workflows/comment-content-changes-table.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,8 @@ jobs:
comment-author: 'github-actions[bot]'
body-includes: '<!-- MODIFIED_CONTENT_LINKING_COMMENT -->'

- name: Update comment
if: ${{ steps.changes.outputs.changesTable != '' }}
- name: Update comment on docs-internal
if: ${{github.repository == 'github/docs-internal' && steps.changes.outputs.changesTable != '' }}
uses: peter-evans/create-or-update-comment@71345be0265236311c031f5c7866368bd1eff043
with:
comment-id: ${{ steps.findComment.outputs.comment-id }}
Expand All @@ -94,6 +94,34 @@ jobs:
The table contains an overview of files in the `content` directory that have been changed in this pull request. It's provided to make it easy to review your changes on the review server. Please note that changes to the `data` directory will not show up in this table.
:bangbang: You can also preview changes [using Codespaces](https://github.com/github/docs-engineering/blob/main/docs/team-practices/use-a-codespace-to-review.md) or by [spinning up a local environment](https://docs.github.com/en/contributing/setting-up-your-environment-to-work-on-github-docs/creating-a-local-environment). Please continue to [let us know](https://github.com/github/docs-team/discussions/4889) if you have trouble with the review server and use one of those options to preview your changes.
---
### Content directory changes
_You may find it useful to copy this table into the pull request summary. There you can edit it to share links to important articles or changes and to give a high-level overview of how the changes in your pull request support the overall goals of the pull request._
${{ steps.changes.outputs.changesTable }}
---
Key: **fpt**: Free, Pro, Team; **ghec**: GitHub Enterprise Cloud; **ghes**: GitHub Enterprise Server
_This table is posted from the [${{ github.workflow }}](https://github.com/${{ github.repository }}/blob/${{ github.sha }}/.github/workflows/comment-content-changes-table.yml) workflow._
edit-mode: replace

- name: Update comment on docs public
if: ${{github.repository == 'github/docs' && steps.changes.outputs.changesTable != '' }}
uses: peter-evans/create-or-update-comment@71345be0265236311c031f5c7866368bd1eff043
with:
comment-id: ${{ steps.findComment.outputs.comment-id }}
issue-number: ${{ github.event.pull_request.number || inputs.PR_NUMBER }}
body: |
<!-- MODIFIED_CONTENT_LINKING_COMMENT -->
## 👓 Previews for changed content
**This comment is 🤖 automatically generated and will be overwritten every time changes are committed to this branch.**
The table contains an overview of files in the `content` directory that have been changed in this pull request. It's provided to make it easy to review your changes on the review server. Please note that changes to the `data` directory will not show up in this table.
:bangbang: You can also preview changes [using Codespaces](https://docs.github.com/en/contributing/setting-up-your-environment-to-work-on-github-docs/working-on-github-docs-in-a-codespace) or by [spinning up a local environment](https://docs.github.com/en/contributing/setting-up-your-environment-to-work-on-github-docs/creating-a-local-environment). If you have trouble with the review server, use one of those options to preview your changes.
---
### Content directory changes
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions config/moda/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,23 @@ environments:
- name: staging-cedar
require_pipeline: false
notify_still_locked: true # Notify last person to lock this after an hour
secret_environment: production
cluster_selector:
profile: general
region: iad

- name: staging-pine
require_pipeline: false
notify_still_locked: true # Notify last person to lock this after an hour
secret_environment: production
cluster_selector:
profile: general
region: iad

- name: staging-spruce
require_pipeline: false
notify_still_locked: true # Notify last person to lock this after an hour
secret_environment: production
cluster_selector:
profile: general
region: iad
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,10 @@ If your project has any dependencies, you can showcase your understanding of sec

You can automate this process with {% data variables.product.prodname_dependabot %}, which generates pull requests that update your project to new versions as they become available. See [AUTOTITLE](/code-security/getting-started/dependabot-quickstart-guide).

## Step 5: Share your results

Share your updated profile and get inspiration from others in our [Community discussion](https://github.com/orgs/community/discussions/150827).

## Extra credit: Maintaining your projects

Your profile is now ready to be included on your resume! The changes you made today will have a big impact on your job search and will make your {% data variables.product.github %} profile stand out to hiring managers.
Expand Down
10 changes: 10 additions & 0 deletions content/copilot/about-github-copilot/github-copilot-features.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ redirect_from:

Autocomplete-style suggestions from {% data variables.product.prodname_copilot_short %} in supported IDEs _({% data variables.product.prodname_vscode %}, {% data variables.product.prodname_vs %}, JetBrains IDEs, Azure Data Studio, Xcode, and Vim/Neovim)_. For more information, see [AUTOTITLE](/copilot/using-github-copilot/getting-code-suggestions-in-your-ide-with-github-copilot).

If you use {% data variables.product.prodname_vscode_shortname %}, you can also use {% data variables.copilot.next_edit_suggestions %}, which will predict the location of the next edit you are likely to make and suggest a completion for it.

> [!NOTE] {% data variables.copilot.next_edit_suggestions_caps %} is currently in {% data variables.release-phases.public_preview %} and is subject to change.
### {% data variables.product.prodname_copilot_chat_short %}

A chat interface that lets you ask coding-related questions. {% data variables.product.prodname_copilot_chat %} is available on the {% data variables.product.github %} website, in {% data variables.product.prodname_mobile %}, in supported IDEs _({% data variables.product.prodname_vscode %}, {% data variables.product.prodname_vs %}, and JetBrains IDEs)_, and in {% data variables.product.prodname_windows_terminal %}. Users can also use skills with {% data variables.product.prodname_copilot_chat_short %}. For more information, see [AUTOTITLE](/copilot/using-github-copilot/asking-github-copilot-questions-in-github) and [AUTOTITLE](/copilot/using-github-copilot/asking-github-copilot-questions-in-your-ide).
Expand Down Expand Up @@ -50,6 +54,12 @@ Bringing the power of industry leading large and small language models to users

AI-generated code review suggestions to help you write better code. For more information, see [AUTOTITLE](/copilot/using-github-copilot/code-review/using-copilot-code-review).

### {% data variables.product.prodname_copilot_edits_vscode_short %}

{% data variables.product.prodname_copilot_edits_vscode_short %} is available in {% data variables.product.prodname_vscode %}. {% data reusables.copilot.about-copilot-edits %}

For more information, see [{% data variables.product.prodname_copilot_edits_vscode_short %}](https://code.visualstudio.com/docs/copilot/copilot-edits) in the {% data variables.product.prodname_vscode %} documentation.

### {% data variables.product.prodname_copilot_short %} knowledge bases _({% data variables.product.prodname_copilot_enterprise_short %} only)_

Create and manage collections of documentation to use as context for chatting with {% data variables.product.prodname_copilot_short %}. When you ask a question in {% data variables.product.prodname_copilot_chat_dotcom_short %} or in {% data variables.product.prodname_vscode_shortname %}, you can specify a knowledge base as the context for your question. For more information, see [AUTOTITLE](/copilot/customizing-copilot/managing-copilot-knowledge-bases).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,12 @@ topics:

{% data variables.product.prodname_copilot %} can provide chat responses that are tailored to the way your team works, the tools you use, or the specifics of your project, if you provide it with enough context to do so. Instead of repeatedly adding this contextual detail to your chat questions, you can create a file that automatically adds this information for you. The additional information is not displayed in the chat, but is available to {% data variables.product.prodname_copilot_short %} to allow it to generate higher quality responses.

{% vscode %}

Additionally, you can create prompt files. With prompt files, you can specify common prompt instructions and relevant context in a Markdown file (`*.prompt.md`), that you can then reuse in your chat prompts. Prompt files are only available in {% data variables.product.prodname_vscode_shortname %}.

{% endvscode %}

## Prerequisites

* A custom instructions file (see the instructions below).
Expand Down Expand Up @@ -124,15 +130,15 @@ You can click the reference to open the file.

{% data reusables.copilot.custom-instructions-reference %}

![Screenshot of an expanded References list, showing the 'copilot-instructions.md' file highlighted with a dark organge outline.](/assets/images/help/copilot/custom-instructions-vscode.png)
![Screenshot of an expanded References list, showing the 'copilot-instructions.md' file highlighted with a dark orange outline.](/assets/images/help/copilot/custom-instructions-vscode.png)

{% endvscode %}

{% visualstudio %}

{% data reusables.copilot.custom-instructions-reference %}

![Screenshot of the References popup, showing the 'copilot-instructions.md' file highlighted with a dark organge outline.](/assets/images/help/copilot/custom-instruction-ref-visual-studio.png)
![Screenshot of the References popup, showing the 'copilot-instructions.md' file highlighted with a dark orange outline.](/assets/images/help/copilot/custom-instruction-ref-visual-studio.png)

{% endvisualstudio %}

Expand Down Expand Up @@ -167,3 +173,74 @@ Your choice persists until you change it.
1. Select or clear the checkbox for **(Preview) Enable custom instructions to be loaded from .github/copilot-instructions.md files and added to requests**.

{% endvisualstudio %}

{% vscode %}

## About prompt files

> [!NOTE] Prompt files are {% data variables.release-phases.public_preview %} and subject to change.
Prompt files let you build and share reusable prompt instructions with additional context. A prompt file is a Markdown file that mimics the existing format of writing prompts in {% data variables.product.prodname_copilot_chat_short %} (for example, `Rewrite #file:x.ts`). This allows blending natural language instructions, additional context, and even linking to other prompt files as dependencies.

While custom instructions help to add codebase-wide context to each AI workflow, prompt files let you add instructions to a specific chat interaction.

Common use cases include:

* **Code generation**. Create reusable prompts for components, tests, or migrations (for example, React forms, or API mocks).
* **Domain expertise**. Share specialized knowledge through prompts, such as security practices, or compliance checks.
* **Team collaboration**. Document patterns and guidelines with references to specs and documentation.
* **Onboarding**. Create step-by-step guides for complex processes or project-specific patterns.

### Prompt file examples

The following examples demonstrate how to use prompt files.

* `react-form.prompt.md` - documents a reusable task for generating a form.

```markdown
Your goal is to generate a new React form component.

Ask for the form name and fields if not provided.

Requirements for the form:
- Use form design system components: [design-system/Form.md](../docs/design-system/Form.md)
- Use `react-hook-form` for form state management:
- Always define TypeScript types for your form data
- Prefer *uncontrolled* components using register
- Use `defaultValues` to prevent unnecessary rerenders
- Use `yup` for validation:
- Create reusable validation schemas in separate files
- Use TypeScript types to ensure type safety
- Customize UX-friendly validation rules
```

* `security-api.prompt.md` - documents reusable security practices for REST APIs, which can be used to do security reviews of REST APIs.

```markdown
Secure REST API review:
- Ensure all endpoints are protected by authentication and authorization
- Validate all user inputs and sanitize data
- Implement rate limiting and throttling
- Implement logging and monitoring for security events
```

### Using prompt files

To enable prompt files, configure the `chat.promptFiles` {% data variables.product.prodname_vscode_shortname %} setting. Set it to `true` or use the `{ "/path/to/folder": boolean }` notation to specify a different path. Relative paths are resolved from the root folder(s) of your workspace, and the default value of `.github/prompts` is used if no other path is provided. For more detailed instructions, see [{% data variables.product.prodname_copilot %} in {% data variables.product.prodname_vscode_shortname %} settings reference](https://code.visualstudio.com/docs/copilot/copilot-settings) in the {% data variables.product.prodname_vscode %} documentation.

1. Create a `.prompt.md` file in the `.github/prompts` directory of your workspace.
1. Write prompt instructions by using Markdown formatting.

Reference additional workspace files as Markdown links (`[index](../index.ts)`), or as `#file:../index.ts` references within the prompt file. You can also reference other `.prompt.md` files.

1. Select the attach icon, then select **Prompt...** and choose the prompt file to attach it in {% data variables.product.prodname_copilot_chat_short %} or {% data variables.product.prodname_copilot_edits_vscode_short %}.
1. Optionally, attach additional context files required for the task.
1. Send the chat prompt.

* For reusable tasks, send the prompt without any additional instructions.
* Include additional instructions to provide more context for the task at hand.

> [!TIP] Reference additional context files like API specs or documentation by using Markdown links to provide {% data variables.product.prodname_copilot_short %} with more complete information.
{% endvscode %}
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ If you use {% data variables.product.prodname_vscode %}, you can use {% data var
* Learn from the code {% data variables.product.prodname_copilot_short %} generates
* Help you configure your editor

You can learn more about scenarios and setup in the [VS Code documentation](https://code.visualstudio.com/docs/copilot/overview#_use-cases-for-github-copilot-in-vs-code).
You can learn more about scenarios and setup in the [{% data variables.product.prodname_vscode_shortname %} documentation](https://code.visualstudio.com/docs/copilot/overview#_use-cases-for-github-copilot-in-vs-code).

After you install the {% data variables.product.prodname_copilot %} extension, you can enable or disable it, and you can configure advanced settings within {% data variables.product.prodname_vscode %} or on {% data variables.product.github %}.

Expand Down Expand Up @@ -317,6 +317,12 @@ You can choose to enable or disable inline suggestions for {% data variables.pro
1. In the left-side panel of the settings tab, click **Extensions** and then select **{% data variables.product.prodname_copilot_short %}**.
1. Under "Inline Suggest:Enable," select or deselect the checkbox to enable or disable inline suggestions.

## Enabling {% data variables.copilot.next_edit_suggestions %}

You can enable {% data variables.copilot.next_edit_suggestions %} via the {% data variables.product.prodname_vscode_shortname %} setting `github.copilot.nextEditSuggestions.enabled`. For more detailed instructions, see [Enabling edit suggestions](https://code.visualstudio.com/docs/copilot/ai-powered-suggestions#_enabling-edit-suggestions) in the {% data variables.product.prodname_vscode_shortname %} documentation.

If you have a {% data variables.product.prodname_copilot_business_short %} {% ifversion ghec %}or {% data variables.product.prodname_copilot_enterprise_short %}{% endif %} subscription, then the organization {% ifversion ghec %}or enterprise{% endif %} from which you receive your subscription must enable the **Editor Preview Features** setting. See [AUTOTITLE](/enterprise-cloud@latest/copilot/managing-copilot/managing-github-copilot-in-your-organization/managing-policies-for-copilot-in-your-organization#enabling-copilot-features-in-your-organization){% ifversion ghec %} or [AUTOTITLE](/enterprise-cloud@latest/copilot/managing-copilot/managing-copilot-for-your-enterprise/managing-policies-and-features-for-copilot-in-your-enterprise#configuring-policies-for-github-copilot){% endif %}.

## Enabling or disabling {% data variables.product.prodname_copilot %} for specific languages

You can specify which languages you want to enable or disable {% data variables.product.prodname_copilot %} for.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,11 @@ topics:
{% data variables.product.prodname_copilot_free_short %} includes the following features:

* Code completion in {% data variables.product.prodname_vscode %}, {% data variables.product.prodname_vs %}, JetBrains IDEs, Vim/Neovim, Xcode, and Azure Data Studio
* {% data variables.product.prodname_copilot_edits_vscode_short %} to make changes across multiple files (**only in {% data variables.product.prodname_vscode %} and {% data variables.product.prodname_vs %}**)
* {% data variables.copilot.next_edit_suggestions_caps %}, which will predict the location of the next edit you are likely to make and suggest a completion for it. (**only in {% data variables.product.prodname_vscode_shortname %}**)
* {% data variables.product.prodname_copilot_edits_vscode_short %} to make changes across multiple files. {% data variables.product.prodname_copilot_edits_vscode_short %} is available in two modes: edit mode and agent mode. (**only in {% data variables.product.prodname_vscode_shortname %}**)
* {% data variables.product.prodname_copilot_chat_short %} in {% data variables.product.prodname_vscode %}, {% data variables.product.prodname_vs %}, JetBrains IDEs, and {% data variables.product.prodname_dotcom_the_website %}
* Custom instructions (**only in {% data variables.product.prodname_vs %}, {% data variables.product.prodname_vscode_shortname %}, and {% data variables.product.prodname_dotcom_the_website %}**)
* Prompt files (**only in {% data variables.product.prodname_vscode_shortname %}**)
* Block suggestions matching public code
* Access to the {% data variables.copilot.copilot_claude_sonnet %} and {% data variables.copilot.copilot_gemini_flash %} models
* Access to {% data variables.product.prodname_copilot_extensions_short %} in {% data variables.product.prodname_vscode %}, {% data variables.product.prodname_vs %}, JetBrains IDEs, {% data variables.product.prodname_dotcom_the_website %}, and {% data variables.product.prodname_mobile %}
Expand Down
Loading

0 comments on commit 092acb2

Please sign in to comment.