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
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: Enhancing Copilot agent mode with MCP
allowTitleToDifferFromFilename: true
shortTitle: Enhance agent mode with MCP
intro: "Learn how to use the Model Context Protocol (MCP) to expand {% data variables.copilot.copilot_chat_short %}''s agentic capabilities."
intro: "Learn how to use the Model Context Protocol (MCP) to expand the agentic capabilities of {% data variables.copilot.copilot_chat_short %}."
versions:
feature: copilot
topics:
Expand Down
2 changes: 1 addition & 1 deletion data/reusables/actions/about-larger-runners.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Customers on {% data variables.product.prodname_team %} and {% data variables.product.prodname_ghe_cloud %} plans can choose from a range of managed virtual machines that have more resources than the [standard {% data variables.product.prodname_dotcom %}-hosted runners](/actions/using-github-hosted-runners/about-github-hosted-runners#supported-runners-and-hardware-resources). These machines are referred to as "{% data variables.actions.hosted_runner %}." They offer the following advanced features:
Customers on {% data variables.product.prodname_team %} and {% data variables.product.prodname_ghe_cloud %} plans can choose from a range of managed virtual machines that have more resources than the [standard {% data variables.product.prodname_dotcom %}-hosted runners](/actions/how-tos/using-github-hosted-runners/using-github-hosted-runners/about-github-hosted-runners#supported-runners-and-hardware-resources). These machines are referred to as "{% data variables.actions.hosted_runner %}." They offer the following advanced features:

* More RAM, CPU, and disk space
* Static IP addresses
Expand Down
1 change: 1 addition & 0 deletions data/reusables/contributing/content-linter-rules.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
| GHD011 | frontmatter-video-transcripts | Video transcript must be configured correctly | error | frontmatter, feature, video-transcripts |
| GHD012 | frontmatter-schema | Frontmatter must conform to the schema | error | frontmatter, schema |
| GHD007 | code-annotations | Code annotations defined in Markdown must contain a specific layout frontmatter property | error | code, feature, annotate, frontmatter |
| GHD045 | code-annotation-comment-spacing | Code comments in annotation blocks must have exactly one space after the comment character(s) | warning | code, comments, annotate, spacing |
| GHD017 | frontmatter-liquid-syntax | Frontmatter properties must use valid Liquid | error | liquid, frontmatter |
| GHD018 | liquid-syntax | Markdown content must use valid Liquid | error | liquid |
| GHD019 | liquid-if-tags | Liquid `ifversion` tags should be used instead of `if` tags when the argument is a valid version | error | liquid, versioning |
Expand Down
2 changes: 1 addition & 1 deletion data/reusables/gated-features/copilot-coding-agent.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{% data variables.copilot.copilot_coding_agent %} is available with the {% data variables.copilot.copilot_pro %}, {% data variables.copilot.copilot_pro_plus %}, {% data variables.copilot.copilot_for_business %} and {% data variables.copilot.copilot_enterprise %} plans in repositories where it has not been disabled. {% data variables.copilot.copilot_coding_agent %} is not available in repositories owned by {% data variables.enterprise.prodname_managed_users %}.
{% data variables.copilot.copilot_coding_agent %} is available with the {% data variables.copilot.copilot_pro %}, {% data variables.copilot.copilot_pro_plus %}, {% data variables.copilot.copilot_for_business %} and {% data variables.copilot.copilot_enterprise %} plans. Access for {% data variables.product.prodname_copilot_short %} trials is coming soon. The agent is available in all repositories, except where it has been explicitly disabled and repositories owned by {% data variables.enterprise.prodname_managed_users %}.
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
import { addError, filterTokens } from 'markdownlint-rule-helpers'

export const codeAnnotationCommentSpacing = {
names: ['GHD045', 'code-annotation-comment-spacing'],
description:
'Code comments in annotation blocks must have exactly one space after the comment character(s)',
tags: ['code', 'comments', 'annotate', 'spacing'],
parser: 'markdownit',
function: (params, onError) => {
filterTokens(params, 'fence', (token) => {
if (!token.info.includes('annotate')) return

const lines = token.content.split('\n')

lines.forEach((line, index) => {
const trimmedLine = line.trim()
if (!trimmedLine) return

// Define a map of comment patterns
const commentPatterns = {
'//': /^(\/\/)(.*)/, // JavaScript/TypeScript/Java/C# style comments
'#': /^(#)(.*)/, // Python/Ruby/Shell/YAML style comments
'--': /^(--)(.*)/, // SQL/Lua style comments
}

// Check for different comment patterns
let commentMatch = null
let commentChar = null
let restOfLine = null

// Iterate over the map to find a matching comment style
for (const [char, pattern] of Object.entries(commentPatterns)) {
if (trimmedLine.startsWith(char)) {
commentMatch = trimmedLine.match(pattern)
commentChar = char
restOfLine = commentMatch ? commentMatch[2] : ''
break
}
}

if (commentMatch && restOfLine !== null) {
// Skip shebang lines (#!/...)
if (trimmedLine.startsWith('#!')) {
return
}

// Allow empty comments or comments with exactly one space
if (restOfLine === '' || restOfLine.startsWith(' ')) {
// If it starts with a space, make sure it's exactly one space
if (restOfLine.startsWith(' ') && restOfLine.length > 1 && restOfLine[1] === ' ') {
// Multiple spaces - this is an error
const lineNumber = token.lineNumber + index + 1
const fixedLine = line.replace(
new RegExp(`^(\\s*${commentChar.replace(/[.*+?^${}()|[\]\\]/g, '\\$&')})\\s+`),
`$1 `,
)

addError(
onError,
lineNumber,
`Comment must have exactly one space after '${commentChar}', found multiple spaces`,
line,
[1, line.length],
{
lineNumber,
editColumn: 1,
deleteCount: line.length,
insertText: fixedLine,
},
)
}
// Single space or empty - this is correct
return
} else {
// No space after comment character - this is an error
const lineNumber = token.lineNumber + index + 1
const leadingWhitespace = line.match(/^\s*/)[0]
const fixedLine = leadingWhitespace + commentChar + ' ' + restOfLine

addError(
onError,
lineNumber,
`Comment must have exactly one space after '${commentChar}'`,
line,
[1, line.length],
{
lineNumber,
editColumn: 1,
deleteCount: line.length,
insertText: fixedLine,
},
)
}
}
})
})
},
}
2 changes: 2 additions & 0 deletions src/content-linter/lib/linting-rules/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import { liquidQuotedConditionalArg } from './liquid-quoted-conditional-arg.js'
import { liquidDataReferencesDefined, liquidDataTagFormat } from './liquid-data-tags.js'
import { frontmatterSchema } from './frontmatter-schema.js'
import { codeAnnotations } from './code-annotations.js'
import { codeAnnotationCommentSpacing } from './code-annotation-comment-spacing.js'
import { frontmatterLiquidSyntax, liquidSyntax } from './liquid-syntax.js'
import { liquidIfTags, liquidIfVersionTags } from './liquid-versioning.js'
import { raiReusableUsage } from './rai-reusable-usage.js'
Expand Down Expand Up @@ -73,6 +74,7 @@ export const gitHubDocsMarkdownlint = {
frontmatterVideoTranscripts,
frontmatterSchema,
codeAnnotations,
codeAnnotationCommentSpacing,
frontmatterLiquidSyntax,
liquidSyntax,
liquidIfTags,
Expand Down
6 changes: 6 additions & 0 deletions src/content-linter/style/github-docs.js
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,12 @@ const githubDocsConfig = {
'partial-markdown-files': true,
'yml-files': true,
},
'code-annotation-comment-spacing': {
// GHD045
severity: 'warning',
'partial-markdown-files': true,
'yml-files': true,
},
'british-english-quotes': {
// GHD048
severity: 'warning',
Expand Down
Loading
Loading