Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
317 changes: 73 additions & 244 deletions .github/prompts/code-review.prompt.md

Large diffs are not rendered by default.

19 changes: 19 additions & 0 deletions .github/workflows/copilot-setup-steps.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
# Copilot cloud agent setup steps
#
# This is a special-name workflow recognized by Copilot cloud agent.
# When a cloud agent session starts (via GitHub issue assignment or the
# Copilot UI), these steps run first to bootstrap the development
# environment before the agent begins working.
#
# The workflow_dispatch trigger allows manual testing of the setup steps.
# This is NOT a regular CI workflow — it does not run on push or PR events.
#
# See also:
# .github/copilot-instructions.md — always-on agent instructions
# .github/instructions/ — contextual instruction files
# .github/prompts/ — on-demand prompt files (e.g. /code-review)

name: 'Copilot Setup Steps'

on:
Expand All @@ -18,17 +33,21 @@ jobs:

- uses: ./.github/actions/node-npm-setup

# Search and language test suites require a running Elasticsearch instance.
- uses: ./.github/actions/setup-elasticsearch
with:
token: ${{ secrets.DOCS_BOT_PAT_BASE }}

# docs-internal has early-access content that must be fetched separately.
- uses: ./.github/actions/get-docs-early-access
if: ${{ github.repository == 'github/docs-internal' }}
with:
token: ${{ secrets.DOCS_BOT_PAT_BASE }}

# Many test suites depend on Next.js build artifacts.
- name: Build
run: npm run build

# Populate Elasticsearch with fixture data so search/language tests work.
- name: Index fixtures into the local Elasticsearch
run: npm run index-test-fixtures
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ The `github` context contains information about the workflow run and the event t
|---------------|------|-------------|
| `github` | `object` | The top-level context available during any job or step in a workflow. This object contains all the properties listed below. |
| `github.action` | `string` | The name of the action currently running, or the [`id`](/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsid) of a step. {% data variables.product.prodname_dotcom %} removes special characters, and uses the name `__run` when the current step runs a script without an `id`. If you use the same action more than once in the same job, the name will include a suffix with the sequence number with underscore before it. For example, the first script you run will have the name `__run`, and the second script will be named `__run_2`. Similarly, the second invocation of `actions/checkout` will be `actionscheckout2`. |
| `github.action_path` | `string` | The path where an action is located. This property is only supported in composite actions. You can use this path to access files located in the same repository as the action, for example by changing directories to the path: {% raw %} `cd ${{ github.action_path }}` {% endraw %}. |
| `github.action_path` | `string` | The path where an action is located. This property is only supported in composite actions. You can use this path to access files located in the same repository as the action, for example by changing directories to the path (using the corresponding enviroment variable): {% raw %} `cd "$GITHUB_ACTION_PATH"` {% endraw %}. For more information on evironment variables, see [AUTOTITLE](/actions/reference/security/secure-use#use-an-intermediate-environment-variable). |
| `github.action_ref` | `string` | For a step executing an action, this is the ref of the action being executed. For example, `v2`.<br><br>{% data reusables.actions.composite-actions-unsupported-refs %} |
| `github.action_repository` | `string` | For a step executing an action, this is the owner and repository name of the action. For example, `actions/checkout`.<br><br>{% data reusables.actions.composite-actions-unsupported-refs %} |
| `github.action_status` | `string` | For a composite action, the current result of the composite action. |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,12 @@ category:

{% data reusables.actions.azure-vnet-networking-policies %}

## About VNET failover

{% data reusables.actions.azure-vnet-about-failover %}

For more information about configuring a failover network, see [AUTOTITLE](/admin/configuring-settings/configuring-private-networking-for-hosted-compute-products/configuring-private-networking-for-github-hosted-runners-in-your-enterprise#5-optionally-add-a-failover-network-to-a-network-configuration).

## Managing network configuration policies for organizations in your enterprise

You can give organization owners in your enterprise the ability to set up and maintain organization-level network configurations for {% data variables.product.company_short %}-hosted runners.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,33 @@ You can use the following {% data variables.product.prodname_cli %} commands to
1. To disable a network configuration, to the right of the network configuration, click {% octicon "kebab-horizontal" aria-label="Menu" %}. Then click **Disable**.
1. To delete a network configuration, to the right of the network configuration, click {% octicon "kebab-horizontal" aria-label="Menu" %}. Then click **Delete**.

### 5. Optionally, add a failover network to a network configuration

{% data reusables.actions.azure-vnet-about-failover %}

Before adding a failover network, ensure you have configured the Azure resources (VNET, subnet, network security group, and network settings resource) for the secondary subnet, following the same "Configuring your Azure resources" procedures above. The failover subnet can be in a different Azure region from your primary subnet.

{% data reusables.enterprise-accounts.access-enterprise %}
{% data reusables.enterprise-accounts.settings-tab %}
1. In the left sidebar, click **Hosted compute networking**.
1. Click the edit icon ({% octicon "pencil" aria-label="Edit a network configuration" %}) next to the network configuration you want to add a failover network to. Then click **Edit configuration**.
1. Click **Add failover network**.
1. In the popup window, enter the network settings resource ID for your secondary (failover) Azure subnet.
1. Click **Add Azure Virtual Network**.
1. You will now see two subnets listed in the network configuration: the primary and the failover, labeled accordingly.

### 6. Optionally, enable or disable the failover network

After adding a failover network, you can enable it to route traffic through the secondary subnet, or disable it to return to the primary subnet.

{% data reusables.enterprise-accounts.access-enterprise %}
{% data reusables.enterprise-accounts.settings-tab %}
1. In the left sidebar, click **Hosted compute networking**.
1. Click the edit icon ({% octicon "pencil" aria-label="Edit a network configuration" %}) next to the network configuration. Then click **Edit configuration**.
1. To switch to the failover network, click **Enable failover VNET**. Runner traffic will be routed through the failover subnet.
1. To switch back to the primary network, click **Disable failover VNET**. Runner traffic will return to the primary subnet.


## Enabling creation of network configurations for organizations

You can allow organization owners in an enterprise to create their own organization-level network configurations.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ The `dependabot.yml` file controls how {% data variables.product.prodname_depend

## Where to store the `dependabot.yml` file

You must store this file in the `.github` directory of your repository in the default branch (typically `main`). The path is: `.github/dependabot.yml`.
You must store this file in the `.github` directory of your repository in the default branch (typically `main`), at `.github/dependabot.yml` or `.github/dependabot.yaml`.

## How the `dependabot.yml` file works

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Before you can assign tasks to coding agents on {% data variables.product.github
* For **{% data variables.copilot.copilot_pro %} and {% data variables.copilot.copilot_pro_plus %} subscribers**, see [AUTOTITLE](/copilot/how-tos/manage-your-account/manage-policies#enabling-or-disabling-third-party-agents-in-your-repositories).
* For **{% data variables.copilot.copilot_for_business %} and {% data variables.copilot.copilot_enterprise %} subscribers**, see [AUTOTITLE](/copilot/how-tos/administer-copilot/manage-for-organization/manage-policies) or [AUTOTITLE](/enterprise-cloud@latest/copilot/how-tos/administer-copilot/manage-for-enterprise/manage-enterprise-policies).

These policies do not apply to **local** agents in {% data variables.product.prodname_vscode %}, which cannot be disabled. They _do_ apply to **cloud** agents in {% data variables.product.prodname_vscode %}. See [Types of agents](https://code.visualstudio.com/docs/copilot/agents/overview#_types-of-agents) in the {% data variables.product.prodname_vscode %} documentation.
These policies do not apply to **local** agents in {% data variables.product.prodname_vscode %}. To configure agent settings in {% data variables.product.prodname_vscode %}, see [Types of agents](https://code.visualstudio.com/docs/copilot/agents/overview#_types-of-agents) in the {% data variables.product.prodname_vscode %} documentation. To adjust enterprise agent settings in {% data variables.product.prodname_vscode %}, see [Enable or disable the use of agents](https://code.visualstudio.com/docs/enterprise/ai-settings#_enable-or-disable-the-use-of-agents) in the {% data variables.product.prodname_vscode %} documentation.

## Supported coding agents

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ You can customize {% data variables.copilot.copilot_coding_agent %} in a number

### Limitations in {% data variables.copilot.copilot_coding_agent %}'s compatibility with other features

* **{% data variables.product.prodname_copilot_short %} isn't able to comply with certain rules that may be configured for your repository**. If you have configured a ruleset or branch protection rule that isn't compatible with {% data variables.copilot.copilot_coding_agent %} (for example the "Require signed commits" rule), access to the agent will be blocked. If the rule is configured using rulesets, you can add {% data variables.product.prodname_copilot_short %} as a bypass actor to enable access. See [AUTOTITLE](/repositories/configuring-branches-and-merges-in-your-repository/managing-rulesets/creating-rulesets-for-a-repository#granting-bypass-permissions-for-your-branch-or-tag-ruleset).
* **{% data variables.product.prodname_copilot_short %} isn't able to comply with certain rules that may be configured for your repository**. If you have configured a ruleset or branch protection rule that isn't compatible with {% data variables.copilot.copilot_coding_agent %}, access to the agent will be blocked. For example, a rule that only allows specific commit authors can prevent {% data variables.copilot.copilot_coding_agent %} from creating or updating pull requests. If the rule is configured using rulesets, you can add {% data variables.product.prodname_copilot_short %} as a bypass actor to enable access. See [AUTOTITLE](/repositories/configuring-branches-and-merges-in-your-repository/managing-rulesets/creating-rulesets-for-a-repository#granting-bypass-permissions-for-your-branch-or-tag-ruleset).
* **{% data variables.copilot.copilot_coding_agent %} doesn't account for content exclusions**. Content exclusions allow administrators to configure {% data variables.product.prodname_copilot_short %} to ignore certain files. When using {% data variables.copilot.copilot_coding_agent %}, {% data variables.product.prodname_copilot_short %} will not ignore these files, and will be able to see and update them. See [AUTOTITLE](/copilot/managing-copilot/configuring-and-auditing-content-exclusion/excluding-content-from-github-copilot).
* **{% data variables.copilot.copilot_coding_agent %} only works with repositories hosted on {% data variables.product.github %}**. If your repository is stored using a different code hosting platform, {% data variables.product.prodname_copilot_short %} won't be able to work on it.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,3 +56,4 @@ To mitigate this risk, {% data variables.copilot.copilot_coding_agent %} is desi
* {% data variables.copilot.copilot_coding_agent %}'s commits are authored by {% data variables.product.prodname_copilot_short %}, with the developer who assigned the issue or requested the change to the pull request marked as the co-author. This makes it easier to identify code generated by {% data variables.copilot.copilot_coding_agent %} and who started the task.
* Session logs and audit log events are available to administrators.
* The commit message for each agent-authored commit includes a link to the agent session logs, for code review and auditing. See [AUTOTITLE](/copilot/how-tos/use-copilot-agents/coding-agent/track-copilot-sessions).
* {% data variables.copilot.copilot_coding_agent %}'s commits are signed, so they appear as "Verified" on {% data variables.product.github %}. This provides confidence that the commits were made by {% data variables.copilot.copilot_coding_agent %} and have not been altered.
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ category:

> [!NOTE]
> * {% data reusables.gated-features.third-party-agents %}
> * If your organization is owned by an enterprise, these settings are only visible if an enterprise admin has enabled third-party coding agents at the enterprise level. See [AUTOTITLE](/copilot/how-tos/administer-copilot/manage-for-enterprise/manage-enterprise-policies).
You can choose whether to allow the following coding agents to be enabled in your organization:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ Azure AI Foundry (formerly Azure OpenAI) is a common BYOK deployment target for

Replace `YOUR-RESOURCE` with your Azure resource name and `YOUR-DEPLOYMENT-NAME` with your model deployment name. Set the `FOUNDRY_API_KEY` environment variable to your Azure API key.

For examples in Python, Go, and .NET, see [BYOK](https://github.com/github/copilot-sdk/blob/main/docs/auth/byok.md) in the `github/copilot-sdk` repository.
For examples in Python, Go, and .NET, see [BYOK](https://github.com/github/copilot-sdk/blob/main/docs/auth/byok.md) in the `github/copilot-sdk` repository. {% data reusables.copilot.copilot-sdk.java-sdk-link %}

## Provider configuration reference

Expand Down Expand Up @@ -227,7 +227,7 @@ const client = new CopilotClient({

Results are cached after the first call. The handler completely replaces the CLI's `models.list` RPC—no fallback to the server occurs.

For examples in Python, Go, and .NET, see [BYOK](https://github.com/github/copilot-sdk/blob/main/docs/auth/byok.md) in the `github/copilot-sdk` repository.
For examples in Python, Go, and .NET, see [BYOK](https://github.com/github/copilot-sdk/blob/main/docs/auth/byok.md) in the `github/copilot-sdk` repository. {% data reusables.copilot.copilot-sdk.java-sdk-link %}

## Limitations

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ category:

{% data variables.copilot.copilot_sdk %} has built-in support for configuring OpenTelemetry on the CLI process and propagating W3C Trace Context between the SDK and CLI.

For examples in Python, Go, and .NET, see the [`github/copilot-sdk` repository](https://github.com/github/copilot-sdk/blob/main/docs/observability/opentelemetry.md).
For examples in Python, Go, and .NET, see the [`github/copilot-sdk` repository](https://github.com/github/copilot-sdk/blob/main/docs/observability/opentelemetry.md). {% data reusables.copilot.copilot-sdk.java-sdk-link %}

## Built-in telemetry support

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ All guides assume you have:
* Python: `pip install github-copilot-sdk`
* Go: `go get github.com/github/copilot-sdk/go`
* .NET: `dotnet add package GitHub.Copilot.SDK`
* Java: See the [`github/copilot-sdk-java`](https://github.com/github/copilot-sdk-java) repository for Maven/Gradle setup

If you're new to the {% data variables.copilot.copilot_sdk %}, start with [AUTOTITLE](/copilot/how-tos/copilot-sdk/sdk-getting-started) first, then return here for production configuration.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const client = new CopilotClient({
});
```

For examples in Python, Go, and .NET, see [Debugging Guide](https://github.com/github/copilot-sdk/blob/main/docs/troubleshooting/debugging.md) in the `github/copilot-sdk` repository.
For examples in Python, Go, and .NET, see [Debugging Guide](https://github.com/github/copilot-sdk/blob/main/docs/troubleshooting/debugging.md) in the `github/copilot-sdk` repository. {% data reusables.copilot.copilot-sdk.java-sdk-link %}

### Log directory

Expand Down Expand Up @@ -60,7 +60,7 @@ For Python and Go, which do not currently support passing extra CLI arguments, r
});
```

For examples in Python, Go, and .NET, see [Debugging Guide](https://github.com/github/copilot-sdk/blob/main/docs/troubleshooting/debugging.md) in the `github/copilot-sdk` repository.
For examples in Python, Go, and .NET, see [Debugging Guide](https://github.com/github/copilot-sdk/blob/main/docs/troubleshooting/debugging.md) in the `github/copilot-sdk` repository. {% data reusables.copilot.copilot-sdk.java-sdk-link %}

### "Not authenticated"

Expand All @@ -82,7 +82,7 @@ For Python and Go, which do not currently support passing extra CLI arguments, r
});
```

For examples in Python, Go, and .NET, see [Debugging Guide](https://github.com/github/copilot-sdk/blob/main/docs/troubleshooting/debugging.md) in the `github/copilot-sdk` repository.
For examples in Python, Go, and .NET, see [Debugging Guide](https://github.com/github/copilot-sdk/blob/main/docs/troubleshooting/debugging.md) in the `github/copilot-sdk` repository. {% data reusables.copilot.copilot-sdk.java-sdk-link %}

### "Session not found"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ const session = await client.createSession({
});
```

For examples in Python, Go, and .NET, see the [`github/copilot-sdk` repository](https://github.com/github/copilot-sdk/blob/main/docs/features/custom-agents.md#defining-custom-agents).
For examples in Python, Go, and .NET, see the [`github/copilot-sdk` repository](https://github.com/github/copilot-sdk/blob/main/docs/features/custom-agents.md#defining-custom-agents). {% data reusables.copilot.copilot-sdk.java-sdk-link %}

## Configuration reference

Expand Down Expand Up @@ -96,7 +96,7 @@ const session = await client.createSession({
});
```

For examples in Python, Go, and .NET, see the [`github/copilot-sdk` repository](https://github.com/github/copilot-sdk/blob/main/docs/features/custom-agents.md#selecting-an-agent-at-session-creation).
For examples in Python, Go, and .NET, see the [`github/copilot-sdk` repository](https://github.com/github/copilot-sdk/blob/main/docs/features/custom-agents.md#selecting-an-agent-at-session-creation). {% data reusables.copilot.copilot-sdk.java-sdk-link %}

## How sub-agent delegation works

Expand Down Expand Up @@ -172,7 +172,7 @@ const response = await session.sendAndWait({
});
```

For examples in Python, Go, and .NET, see the [`github/copilot-sdk` repository](https://github.com/github/copilot-sdk/blob/main/docs/features/custom-agents.md#listening-to-sub-agent-events).
For examples in Python, Go, and .NET, see the [`github/copilot-sdk` repository](https://github.com/github/copilot-sdk/blob/main/docs/features/custom-agents.md#listening-to-sub-agent-events). {% data reusables.copilot.copilot-sdk.java-sdk-link %}

## Building an agent tree UI

Expand Down
Loading
Loading