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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions content/copilot/concepts/context/mcp.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,13 @@ Running the {% data variables.product.github %} MCP server locally requires a bi

To learn how to set up and use the {% data variables.product.github %} MCP server, see [AUTOTITLE](/copilot/how-tos/context/model-context-protocol/using-the-github-mcp-server).

## About the {% data variables.product.github %} MCP Registry

The {% data variables.product.github %} MCP Registry is a curated list of MCP servers from partners and the community. You can use the registry to discover new MCP servers and find ones that meet your specific needs. See [the {% data variables.product.github %} MCP Registry](https://github.com/mcp).

>[!NOTE]
> The {% data variables.product.github %} MCP Registry is currently in {% data variables.release-phases.public_preview %} and subject to change.

## Availability

There is currently broad support for local MCP servers in clients such as {% data variables.product.prodname_vscode %}, JetBrains IDEs, XCode, and others.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,25 @@ For information on currently available MCP servers, see [the MCP servers reposit

## Configuring MCP servers in {% data variables.product.prodname_vscode %}

MCP servers can be configured manually in a configuration file, or through the {% data variables.product.github %} MCP Registry. The {% data variables.product.github %} MCP Registry provides a curated list of MCP servers that you can easily add to your {% data variables.product.prodname_vscode %} instance.

### Using the {% data variables.product.github %} MCP Registry

>[!NOTE]
> The {% data variables.product.github %} MCP Registry is in {% data variables.release-phases.public_preview %} and may change.

Only MCP servers listed in the {% data variables.product.github %} MCP Registry can be added through the registry. Other servers can be configured manually. See [Configuring MCP servers manually](#configuring-mcp-servers-manually).

1. Visit the [{% data variables.product.github %} MCP Registry](https://github.com/mcp).
1. In the search bar, search for the MCP server you want to add, then click the MCP server in the list of matches.
1. On the MCP server page, read the description for details on installation requirements and other important usage information. This may vary between servers.
1. Click **Install server**, then select **Install in {% data variables.product.prodname_vscode_shortname %}**.
1. {% data variables.product.prodname_vscode %} will open, on the server's Marketplace page. Click **Install** to add the MCP server to your {% data variables.product.prodname_vscode %} instance.
1. If further configuration is required, follow the instructions on the MCP server page in the {% data variables.product.github %} MCP Registry.
1. To check that the MCP server has been added, in the **agent mode** of {% data variables.copilot.copilot_chat_short %}, click the tools icon. A dropdown list will appear, showing all the MCP servers and associated tools that are currently available in your {% data variables.product.prodname_vscode %} instance.

### Configuring MCP servers manually

To configure MCP servers in {% data variables.product.prodname_vscode %}, you need to set up a configuration script that specifies the details of the MCP servers you want to use. You can configure MCP servers for either:

{% data reusables.copilot.mcp.mcp-configuration-location %}
Expand Down
1 change: 1 addition & 0 deletions data/reusables/profile/copilot_settings.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1. In the top right corner of {% data variables.product.prodname_dotcom %}, click your profile picture, then click **{% octicon "copilot" aria-hidden="true" aria-label="copilot" %} {% data variables.product.prodname_copilot_short %} settings**.
3 changes: 0 additions & 3 deletions src/content-linter/lib/default-markdownlint-options.js

This file was deleted.

5 changes: 5 additions & 0 deletions src/content-linter/lib/default-markdownlint-options.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import type { Configuration } from 'markdownlint'

export const defaultConfig: Configuration = {
default: false,
}
8 changes: 0 additions & 8 deletions src/content-linter/lib/helpers/get-rules.d.ts

This file was deleted.

8 changes: 0 additions & 8 deletions src/content-linter/lib/helpers/get-rules.js

This file was deleted.

12 changes: 12 additions & 0 deletions src/content-linter/lib/helpers/get-rules.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { gitHubDocsMarkdownlint } from '@/content-linter/lib/linting-rules/index'
import { baseConfig } from '@/content-linter/style/base'
import { customConfig } from '@/content-linter/style/github-docs'
import type { Rule } from '@/content-linter/types'

// Import markdownlint rules - external library without TypeScript declarations
// @ts-ignore - markdownlint doesn't provide TypeScript declarations
import markdownlintRules from '../../../../node_modules/markdownlint/lib/rules'

export const customRules: Rule[] = gitHubDocsMarkdownlint.rules
export const allRules: any[] = [...markdownlintRules, ...gitHubDocsMarkdownlint.rules]
export const allConfig: Record<string, any> = { ...baseConfig, ...customConfig }
9 changes: 0 additions & 9 deletions src/content-linter/lib/helpers/unified-formatter-options.js

This file was deleted.

19 changes: 19 additions & 0 deletions src/content-linter/lib/helpers/unified-formatter-options.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
interface MarkdownFormatterOptions {
bullet: string
emphasis: string
closeAtx: boolean
fence: string
fences: boolean
incrementListMarker: boolean
strong: string
}

export const MARKDOWN_OPTIONS: MarkdownFormatterOptions = {
bullet: '*',
emphasis: '_',
closeAtx: false,
fence: '`',
fences: true,
incrementListMarker: false,
strong: '*',
}
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// If 'THROW_ON_EMPTY' is set and it's value is '0' or 'false' it becomes
// false. Or true if it's 'true' or '1'.
export const THROW_ON_EMPTY = Boolean(
export const THROW_ON_EMPTY: boolean = Boolean(
process.env.THROW_ON_EMPTY
? JSON.parse(process.env.THROW_ON_EMPTY)
: JSON.parse(process.env.CI || process.env.NODE_ENV !== 'production'),
: JSON.parse(String(process.env.CI || process.env.NODE_ENV !== 'production')),
)

export class DataReferenceError extends Error {}
Expand Down
1 change: 0 additions & 1 deletion src/content-render/liquid/ifversion-supported-operators.js

This file was deleted.

5 changes: 5 additions & 0 deletions src/content-render/liquid/ifversion-supported-operators.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
const ifversionSupportedOperators = ['=', '<', '>', '!='] as const

export type IfversionSupportedOperator = (typeof ifversionSupportedOperators)[number]

export default ifversionSupportedOperators
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { processLiquidPost } from './post'
import { engine } from './engine'

export async function renderLiquid(template, context) {
export async function renderLiquid(template: string, context: any): Promise<string> {
template = await engine.parseAndRender(template, context)
template = processLiquidPost(template)
return template
Expand Down
16 changes: 0 additions & 16 deletions src/data-directory/lib/data-schemas/code-languages.js

This file was deleted.

37 changes: 37 additions & 0 deletions src/data-directory/lib/data-schemas/code-languages.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
interface CodeLanguageProperties {
name: {
type: 'string'
}
comment: {
type: 'string'
enum: ['number', 'slash', 'percent', 'hyphen', 'xml', 'none']
}
}

interface CodeLanguageSchema {
type: 'object'
additionalProperties: {
type: 'object'
required: ['name', 'comment']
properties: CodeLanguageProperties
}
}

const codeLanguagesSchema: CodeLanguageSchema = {
type: 'object',
additionalProperties: {
type: 'object',
required: ['name', 'comment'],
properties: {
name: {
type: 'string',
},
comment: {
type: 'string',
enum: ['number', 'slash', 'percent', 'hyphen', 'xml', 'none'],
},
},
},
}

export default codeLanguagesSchema
4 changes: 2 additions & 2 deletions src/data-directory/lib/data-schemas/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ interface DataSchemas {

const dataSchemas: DataSchemas = {
'data/features': '@/data-directory/lib/data-schemas/features.js',
'data/variables': '@/data-directory/lib/data-schemas/variables.js',
'data/variables': '@/data-directory/lib/data-schemas/variables',
'data/learning-tracks': '@/data-directory/lib/data-schemas/learning-tracks.js',
'data/release-notes': '@/data-directory/lib/data-schemas/release-notes.js',
'data/code-languages.yml': '@/data-directory/lib/data-schemas/code-languages.js',
'data/code-languages.yml': '@/data-directory/lib/data-schemas/code-languages',
'data/glossaries/candidates.yml': '@/data-directory/lib/data-schemas/glossaries-candidates.js',
'data/glossaries/external.yml': '@/data-directory/lib/data-schemas/glossaries-external.js',
}
Expand Down
7 changes: 0 additions & 7 deletions src/data-directory/lib/data-schemas/variables.js

This file was deleted.

17 changes: 17 additions & 0 deletions src/data-directory/lib/data-schemas/variables.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
interface VariableSchema {
type: 'object'
additionalProperties: {
type: 'string'
lintable: boolean
}
}

const variablesSchema: VariableSchema = {
type: 'object',
additionalProperties: {
type: 'string',
lintable: true,
},
}

export default variablesSchema
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// prevent `[foo] (bar)` strings with a space between from being interpreted as markdown links
// by encoding the space character

export default function encodeBracketedParentheses(input) {
export default function encodeBracketedParentheses(input: string): string {
return input.replace(/] \(/g, ']&nbsp;(')
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@
/**
* Read only the frontmatter from file
*/
export default async function fmfromf(filepath) {
let fileContent = await fs.readFile(filepath, 'utf8')
// Using any type for return value because frontmatter structure is complex and varies
export default async function fmfromf(filepath: string): Promise<any> {
let fileContent: string = await fs.readFile(filepath, 'utf8')

Check failure

Code scanning / CodeQL

Uncontrolled data used in path expression High

This path depends on a
user-provided value
.
This path depends on a
user-provided value
.
This path depends on a user-provided value.

fileContent = encodeBracketedParentheses(fileContent)

Expand Down
6 changes: 3 additions & 3 deletions src/frame/tests/gitignore.js → src/frame/tests/gitignore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ import path from 'path'

import { describe, expect, test } from 'vitest'

const gitignorePath = path.join(process.cwd(), '.gitignore')
const gitignore = await fs.readFile(gitignorePath, 'utf8')
const entries = gitignore.split(/\r?\n/)
const gitignorePath: string = path.join(process.cwd(), '.gitignore')
const gitignore: string = await fs.readFile(gitignorePath, 'utf8')
const entries: string[] = gitignore.split(/\r?\n/)

describe('.gitignore file', () => {
test('includes an entry for .env', () => {
Expand Down
17 changes: 17 additions & 0 deletions src/graphql/data/fpt/changelog.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,21 @@
[
{
"schemaChanges": [
{
"title": "The GraphQL schema includes these changes:",
"changes": [
"<p>Type <code>CopilotCodeReviewParameters</code> was added</p>",
"<p>Type <code>CopilotCodeReviewParametersInput</code> was added</p>",
"<p>Enum value 'COPILOT_CODE_REVIEW<code>was added to enum</code>RepositoryRuleType'</p>",
"<p>Member <code>CopilotCodeReviewParameters</code> was added to Union type <code>RuleParameters</code></p>",
"<p>Input field <code>copilotCodeReview</code> of type <code>CopilotCodeReviewParametersInput</code> was added to input object type <code>RuleParametersInput</code></p>"
]
}
],
"previewChanges": [],
"upcomingChanges": [],
"date": "2025-09-16"
},
{
"schemaChanges": [
{
Expand Down
41 changes: 41 additions & 0 deletions src/graphql/data/fpt/schema.docs.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -7250,6 +7250,36 @@ type ConvertedToDiscussionEvent implements Node {
id: ID!
}

"""
Request Copilot code review for new pull requests automatically if the author has access to Copilot code review.
"""
type CopilotCodeReviewParameters {
"""
Copilot automatically reviews draft pull requests before they are marked as ready for review.
"""
reviewDraftPullRequests: Boolean!

"""
Copilot automatically reviews each new push to the pull request.
"""
reviewOnPush: Boolean!
}

"""
Request Copilot code review for new pull requests automatically if the author has access to Copilot code review.
"""
input CopilotCodeReviewParametersInput {
"""
Copilot automatically reviews draft pull requests before they are marked as ready for review.
"""
reviewDraftPullRequests: Boolean

"""
Copilot automatically reviews each new push to the pull request.
"""
reviewOnPush: Boolean
}

"""
Copilot endpoint information
"""
Expand Down Expand Up @@ -52909,6 +52939,11 @@ enum RepositoryRuleType {
"""
COMMIT_MESSAGE_PATTERN

"""
Request Copilot code review for new pull requests automatically if the author has access to Copilot code review.
"""
COPILOT_CODE_REVIEW

"""
Only allow users with bypass permission to create matching refs.
"""
Expand Down Expand Up @@ -54874,6 +54909,7 @@ union RuleParameters =
| CommitAuthorEmailPatternParameters
| CommitMessagePatternParameters
| CommitterEmailPatternParameters
| CopilotCodeReviewParameters
| FileExtensionRestrictionParameters
| FilePathRestrictionParameters
| MaxFilePathLengthParameters
Expand Down Expand Up @@ -54915,6 +54951,11 @@ input RuleParametersInput {
"""
committerEmailPattern: CommitterEmailPatternParametersInput

"""
Parameters used for the `copilot_code_review` rule type
"""
copilotCodeReview: CopilotCodeReviewParametersInput

"""
Parameters used for the `file_extension_restriction` rule type
"""
Expand Down
Loading
Loading