Skip to content

Commit

Permalink
Merge pull request #33311 from github/repo-sync
Browse files Browse the repository at this point in the history
Repo sync
  • Loading branch information
docs-bot committed Jun 3, 2024
2 parents f20d663 + 5beb993 commit 03393e8
Show file tree
Hide file tree
Showing 8 changed files with 133 additions and 66 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -937,7 +937,8 @@ You can give {% data variables.product.prodname_dependabot %} access to private

**Note:** Private registries behind firewalls on private networks are supported for the following ecosystems:

- Bundler
- Bundler{% ifversion dependabot-updates-cargo-private-registry-support %}
- Cargo{% endif %}
- Docker
- Gradle
- Maven
Expand Down Expand Up @@ -981,6 +982,18 @@ You must provide the required settings for each configuration `type` that you sp

{% data reusables.dependabot.advanced-private-registry-config-link %}

{% ifversion dependabot-updates-cargo-private-registry-support %}

### `cargo-registry`

The `cargo-registry` type supports a token.

{% data reusables.dependabot.dependabot-updates-path-match %}

{% data reusables.dependabot.cargo-private-registry-config-example %}

{% endif %}

### `composer-repository`

The `composer-repository` type supports username and password. {% data reusables.dependabot.password-definition %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ This article contains recommendations and advice to help you configure {% data v

You'll find detailed guidance for the setup of the following package managers:

- [Bundler](#bundler)
- [Bundler](#bundler){% ifversion dependabot-updates-cargo-private-registry-support %}
- [Cargo](#cargo){% endif %}
- [Docker](#docker)
- [Gradle](#gradle)
- [Maven](#maven)
Expand Down Expand Up @@ -88,6 +89,18 @@ registries:

{% data reusables.dependabot.access-private-dependencies-link %}

{% ifversion dependabot-updates-cargo-private-registry-support %}

### Cargo

Cargo supports username, password and token-based authentication. For more information, see `cargo-registry` in "[AUTOTITLE](/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file#cargo-registry)."

The snippet below shows a `dependabot.yml` file configuration that uses a token.

{% data reusables.dependabot.cargo-private-registry-config-example %}

{% endif %}

### Docker

Docker supports using a username and password for registries. For more information, see `docker-registry` in "[AUTOTITLE](/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file#docker-registry)."
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -333,23 +333,10 @@ To share feedback about {% data variables.product.prodname_copilot_chat_short %}

{% jetbrains %}

{% note %}

**Important:**

{% data reusables.gated-features.copilot-chat-callout %}

{% endnote %}

## About {% data variables.product.prodname_copilot_chat %} and JetBrains

{% data reusables.copilot.chat-procedural-intro %}

## Prerequisites

{% data reusables.copilot.chat-subscription-prerequisite %}

- To use {% data variables.product.prodname_copilot_chat %} in JetBrains, you must have a compatible JetBrains IDE installed. {% data variables.product.prodname_copilot_chat_short %} is compatible with the following IDEs:
- **Access to {% data variables.product.prodname_copilot %}**. See "[AUTOTITLE](/copilot/about-github-copilot#getting-access-to-github-copilot)."
- **A compatible JetBrains IDE**. {% data variables.product.prodname_copilot %} is compatible with the following IDEs:
- IntelliJ IDEA (Ultimate, Community, Educational)
- Android Studio
- AppCode
Expand All @@ -365,80 +352,108 @@ To share feedback about {% data variables.product.prodname_copilot_chat_short %}
- RustRover
- WebStorm

For more information, see the [JetBrains IDEs](https://www.jetbrains.com/products/) tool finder.
See the [JetBrains IDEs](https://www.jetbrains.com/products/) tool finder to download.
- **{% data variables.product.prodname_copilot %} plugin**. See the [{% data variables.product.prodname_copilot %} plugin](https://plugins.jetbrains.com/plugin/17718-github-copilot) in the JetBrains Marketplace. For installation instructions, see "[AUTOTITLE](/copilot/configuring-github-copilot/installing-the-github-copilot-extension-in-your-environment)."
- **Sign in to {% data variables.product.company_short %} in your JetBrains IDE**. For authentication instructions, see "[AUTOTITLE](/copilot/configuring-github-copilot/installing-the-github-copilot-extension-in-your-environment)."

## Enabling or disabling {% data variables.product.prodname_copilot_chat %}
If you have access to {% data variables.product.prodname_copilot %} via your organization or enterprise, you cannot use {% data variables.product.prodname_copilot_chat %} if your organization owner or enterprise administrator has disabled {% data variables.product.prodname_copilot_chat %}. See "[AUTOTITLE](/copilot/managing-github-copilot-in-your-organization/managing-policies-and-features-for-copilot-in-your-organization)."

{% note %}
## Submitting prompts

You can ask {% data variables.product.prodname_copilot_chat_short %} to give code suggestions, explain code, generate unit tests, and suggest code fixes.

1. Open the {% data variables.product.prodname_copilot_chat_short %} window by clicking the **{% data variables.product.prodname_copilot_chat_short %}** icon at the right side of the JetBrains IDE window.

**Note:** If you have a {% data variables.product.prodname_copilot_for_individuals %} subscription, you are automatically granted access to {% data variables.product.prodname_copilot_chat %}.
![Screenshot of the {% data variables.product.prodname_copilot_chat_short %} icon in the Activity Bar.](/assets/images/help/copilot/jetbrains-copilot-chat-icon.png)

{% endnote %}
1. Enter a prompt in the prompt box. For example prompts, see "[Example prompts](#example-prompts)" below.

{% data variables.product.prodname_copilot_chat %} is available to all organizations and enterprises that have an active {% data variables.product.prodname_copilot_for_business %}{% ifversion ghec %} or {% data variables.product.prodname_copilot_enterprise %}{% endif %} license. You can enable or disable {% data variables.product.prodname_copilot_chat %} for your organization or enterprise in the {% data variables.product.prodname_copilot %} settings page.
1. Evaluate {% data variables.product.prodname_copilot_short %}'s response, and submit a follow up prompt if needed.

The response often includes interactive elements. For example, the response may include buttons to copy or insert a code block.

If {% data variables.product.prodname_copilot_chat_short %} is enabled or disabled at the enterprise level, organizations within the enterprise cannot override the setting.
To see the files that {% data variables.product.prodname_copilot_chat_short %} used to generate the response, select the **References** dropdown below the response.

### Enabling or disabling {% data variables.product.prodname_copilot_chat %} at the organization level
## Using keywords in your prompt

{% data reusables.profile.access_org %}
{% data reusables.profile.org_settings %}
1. In the "Code, planning, and automation" section of the sidebar, click **{% octicon "copilot" aria-hidden="true" %} {% data variables.product.prodname_copilot_short %}**, and then click **Policies**.
1. To the right of **{% data variables.product.prodname_copilot_chat_short %} in the IDE**, select the dropdown menu, and then click **Enabled** or **Disabled**.
You can use special keywords to help {% data variables.product.prodname_copilot_short %} understand your prompt.

### Enabling or disabling {% data variables.product.prodname_copilot_chat %} at the enterprise level
### Slash commands

{% data reusables.enterprise-accounts.policies-tab %}
{% data reusables.enterprise-accounts.copilot-tab %}
1. To the right of **{% data variables.product.prodname_copilot_chat_short %} in the IDE**, select the dropdown menu, and then choose the appropriate option.
- Click **Allowed** to enable {% data variables.product.prodname_copilot_chat_short %} for all organizations under your enterprise.
- Click **Blocked** to disable {% data variables.product.prodname_copilot_chat_short %} for all organizations under your enterprise.
- Click **No policy** to allow each organization under your enterprise to set their own policy.
Use slash commands to avoid writing complex prompts for common scenarios. To use a slash command, type `/` in the chat prompt box, followed by a command. Slash commands include:

## Installing or updating the {% data variables.product.prodname_copilot %} plugin in JetBrains
- `/tests`: Generate unit tests for the selected code
- `/fix`: Propose a fix for problems in the selected code
- `/explain`: Explain the selected code
- `/help`: Learn more about using {% data variables.product.prodname_copilot_chat_short %}

To use {% data variables.product.prodname_copilot_chat_short %} in a JetBrains IDE, you must install or update the {% data variables.product.prodname_copilot %} plugin. If you have not yet installed the {% data variables.product.prodname_copilot %} plugin, follow the steps in "[Installing the {% data variables.product.prodname_copilot %} plugin in your JetBrains IDE](#installing-the-github-copilot-plugin-in-your-jetbrains-ide)." If you have already installed the {% data variables.product.prodname_copilot %} plugin, follow the steps in "[Updating the {% data variables.product.prodname_copilot %} plugin in JetBrains](#updating-the-github-copilot-plugin-in-jetbrains)."
To see all available slash commands, type `/` in the chat prompt box.

The following procedures will guide you through installing or updating the {% data variables.product.prodname_copilot %} plugin in IntelliJ IDEA. Steps to install the plugin in another supported IDE may differ.
### File references

### Installing the {% data variables.product.prodname_copilot %} plugin in your JetBrains IDE
By default, {% data variables.product.prodname_copilot_chat_short %} will reference the file that you have open or the code that you have selected. You can also tell {% data variables.product.prodname_copilot_chat_short %} which files to reference by dragging a file into the chat prompt box. Alternatively, you can right click on a file, select **GitHub Copilot**, then select **Reference File in Chat**.

{% data reusables.copilot.installing-copilot-in-jetbrains-ide %}
## Example prompts

### Updating the {% data variables.product.prodname_copilot %} plugin in JetBrains
You can ask {% data variables.product.prodname_copilot_chat_short %} specific questions about your project or general software questions. You can also ask {% data variables.product.prodname_copilot_chat_short %} to write code, fix errors, write tests, and document code.

{% data reusables.copilot.jetbrains-settings-preferences %}
1. In the left-side menu of the **Settings/Preferences** dialog box, click **Plugins**.
1. At the top of the **Settings/Preferences** dialog box, click **Installed**. In the search bar, search for **{% data variables.product.prodname_copilot %}**, then click **Update**.
1. After {% data variables.product.prodname_copilot %} is updated, quit and relaunch your JetBrains IDE.
### Ask general software questions

## Asking your first question
You can ask {% data variables.product.prodname_copilot_chat_short %} general software questions. For example:

{% data reusables.copilot.copilot-chat-exclusively-code-questions %}
- `tell me about nodejs web server frameworks`
- `how to create an express app`
- `how to update an npm package`

1. At the right side of the JetBrains IDE window, click the **{% data variables.product.prodname_copilot_chat_short %}** icon to open the {% data variables.product.prodname_copilot_chat_short %} window.
### Ask questions about your project

![Screenshot of the {% data variables.product.prodname_copilot_chat_short %} icon in the Activity Bar.](/assets/images/help/copilot/jetbrains-copilot-chat-icon.png)
You can ask {% data variables.product.prodname_copilot_chat_short %} questions about your project. To give {% data variables.product.prodname_copilot_short %} the correct context, try some of these strategies:

1. At the bottom of the {% data variables.product.prodname_copilot_chat_short %} window, in the **Ask {% data variables.product.prodname_copilot_short %} a question or type `/` for commands** text box, type a coding related question, then press **Enter**. For example, type "How do I write a function that returns the sum of two numbers?".
1. {% data variables.product.prodname_copilot_chat_short %} will process your question and provide an answer, with code suggestions when appropriate, in the chat window.
- Highlight relevant lines of code.
- Open the relevant file.
- Add the file as a reference. See [File references](#file-references).

If your question is outside the scope of {% data variables.product.prodname_copilot_chat %}, it will tell you and may suggest an alternative question to ask.
For example:

- `what sorting algorithm does this function use`
- `how are these files related` (with references to the files in question)

### Write code

You can ask {% data variables.product.prodname_copilot_short %} to write code for you. For example:

- `write a function to sum all numbers in a list`
- `add error handling to this function`

When {% data variables.product.prodname_copilot_short %} returns a code block, the response includes options to copy the code or to insert the code at your cursor.

### Fix, improve, and refactor code

If your active file contains an error, use the `/fix` slash command to ask {% data variables.product.prodname_copilot_short %} to fix the error.

You can also make general requests to improve or refactor your code.

1. Optionally, if {% data variables.product.prodname_copilot_chat_short %} suggests a follow-up question above the **Ask {% data variables.product.prodname_copilot_short %} a question or type `/` for commands** text box, click the follow-up question to ask it.
- `how would you improve this code?`
- `translate this code to C#`
- `add error handling to this function`

## Asking {% data variables.product.prodname_copilot_chat %} questions about your code
### Write tests

{% data variables.product.prodname_copilot_chat_short %} can provide answers and support with a wide range of coding-related topics.
Use the `/tests` slash command to ask {% data variables.product.prodname_copilot_short %} to write tests for the active file or selected code. For example:

1. In your JetBrains IDE, open the file you want {% data variables.product.prodname_copilot_chat_short %} to help you with.
1. Ask {% data variables.product.prodname_copilot_chat_short %} a question about the file you have open. For example:
- To generate a description of the file's purpose, ask a question like, "What does this file do?"
- To generate a unit test for the file, type a request like, "Write a unit test for this file." Alternatively, highlight the code you want to generate a unit test for, then ask a question like, "Write a unit test for this code."
- To generate a fix for a bug in the file, type a request like, "Fix this bug."
1. Optionally, you can prompt {% data variables.product.prodname_copilot_chat_short %} to perform predefined tasks with slash commands. To see a list of all available slash commands and their definitions, in the **Ask {% data variables.product.prodname_copilot_short %} a question or type `/` for commands** text box, type `/`.
- `/tests`
- `/tests using the Jest framework`
- `/tests ensure the function rejects an empty list`

## Sharing feedback about {% data variables.product.prodname_copilot_chat %}
The `/tests` slash command writes tests for existing code. If you prefer to write tests before writing code (test driven development), omit the `/tests` command. For example:

- `Add tests for a JavaScript function that should sum a list of integers`

## Additional ways to access {% data variables.product.prodname_copilot_chat_short %}

In addition to submitting prompts through the chat window, you can submit built-in requests by right clicking in a file, selecting **GitHub Copilot**, then selecting one of the options.

## Sharing feedback

To share feedback about {% data variables.product.prodname_copilot_chat_short %}, you can use the **share feedback** link in JetBrains.

Expand All @@ -452,6 +467,8 @@ To share feedback about {% data variables.product.prodname_copilot_chat_short %}

## Further reading

{% ifversion ghec %}- "[AUTOTITLE](/enterprise-cloud@latest/copilot/github-copilot-enterprise/copilot-chat-in-github/using-github-copilot-chat-in-githubcom)"{% endif %}
- "[AUTOTITLE](/copilot/github-copilot-chat/about-github-copilot-chat)"
- "[AUTOTITLE](/free-pro-team@latest/site-policy/github-terms/github-copilot-pre-release-terms)"
- "[AUTOTITLE](/free-pro-team@latest/site-policy/github-terms/github-terms-for-additional-products-and-features#github-copilot) "{% ifversion ghec %}
- [{% data variables.product.prodname_copilot %} Trust Center](https://resources.github.com/copilot-trust-center){% endif %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Some {% data variables.product.prodname_dotcom %} products have features that ar

## Core languages supported by {% data variables.product.prodname_dotcom %} features

Core languages for {% data variables.product.prodname_dotcom %} features include C, C++, C#, Go, Java, JavaScript, PHP, Python, Ruby, Scala, and TypeScript. For features that support package managers, the currently supported package managers are included in the table with their relevant languages.
Core languages for {% data variables.product.prodname_dotcom %} features include C, C++, C#, Go, Java, JavaScript, PHP, Python, Ruby,{% ifversion dependabot-updates-cargo-private-registry-support %} Rust,{% endif %} Scala, and TypeScript. For features that support package managers, the currently supported package managers are included in the table with their relevant languages.

Some features are supported for additional languages or package managers. If you want to know whether another language is supported for a feature or to request support for a language, visit {% data variables.contact.community_support_forum %}.

Expand All @@ -35,6 +35,7 @@ Some features are supported for additional languages or package managers. If you
{% data reusables.supported-languages.php %}
{% data reusables.supported-languages.python %}
{% data reusables.supported-languages.ruby %}
{% data reusables.supported-languages.rust %}
{% data reusables.supported-languages.scala %}
{%- ifversion codeql-swift-beta or supply-chain-features-swift-support %}
{% data reusables.supported-languages.swift %}
Expand All @@ -44,6 +45,8 @@ Some features are supported for additional languages or package managers. If you
{% note %}

**Notes:**

{% ifversion fpt or ghec %}- The language support for {% data variables.product.prodname_copilot %} varies depending on the volume and diversity of training data for that language.{% endif %}
- The support of Gradle for the dependency graph and {% data variables.product.prodname_dependabot_alerts %} is limited to the upload of data obtained using the {% data variables.dependency-submission-api.name %}.
- PHP and Scala are supported for {% data variables.product.prodname_code_scanning %} by third-party actions.

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Reference: issue #13801
# Private Cargo Registry Support for Dependabot - [GA]
versions:
fpt: '*'
ghec: '*'
ghes: '>3.13'
14 changes: 14 additions & 0 deletions data/reusables/dependabot/cargo-private-registry-config-example.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{% raw %}

```yaml
registries:
cargo-example:
type: cargo-registry
registry: "name-of-your-registry"
url: https://cargo.cloudsmith.io/foobaruser/test/
token: "Token ${{secrets.CARGO_TOKEN}}"
```

{% endraw %}

We tested this configuration against the `https://cargo.cloudsmith.io` private registry.
Loading

0 comments on commit 03393e8

Please sign in to comment.