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
2 changes: 1 addition & 1 deletion .github/workflows/check-broken-links-github-github.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ jobs:
- name: Create issue from file
if: ${{ hashFiles('broken_github_github_links.md') != '' }}
id: github-github-broken-link-report
uses: peter-evans/create-issue-from-file@24452a72d85239eacf1468b0f1982a9f3fec4c94
uses: peter-evans/create-issue-from-file@fca9117c27cdc29c6c4db3b86c48e4115a786710
with:
token: ${{ env.GITHUB_TOKEN }}
title: ${{ steps.check.outputs.title }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- uses: github/codeql-action/init@eb055d739abdc2e8de2e5f4ba1a8b246daa779aa # v3.26.0
- uses: github/codeql-action/init@e296a935590eb16afc0c0108289f68c87e2a89a5 # v4.30.7
with:
languages: javascript # comma separated list of values from {go, python, javascript, java, cpp, csharp, ruby}
- uses: github/codeql-action/analyze@eb055d739abdc2e8de2e5f4ba1a8b246daa779aa # v3.26.0
- uses: github/codeql-action/analyze@e296a935590eb16afc0c0108289f68c87e2a89a5 # v4.30.7
continue-on-error: true

- uses: ./.github/actions/slack-alert
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/comment-release-note-info.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
if: github.event.pull_request.user.login != 'release-controller[bot]' && github.repository == 'github/docs-internal'
runs-on: ubuntu-latest
steps:
- uses: peter-evans/create-or-update-comment@71345be0265236311c031f5c7866368bd1eff043
- uses: peter-evans/create-or-update-comment@e8674b075228eee787fea43ef493e45ece1004c9
with:
issue-number: ${{ github.event.pull_request.number }}
body: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/dont-delete-assets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:

- name: Find possible previous comment
if: ${{ steps.comment.outputs.markdown != '' }}
uses: peter-evans/find-comment@3eae4d37986fb5a8592848f6a574fdf654e61f9e
uses: peter-evans/find-comment@b30e6a3c0ed37e7c023ccd3f1db5c6c0b0c23aad
id: findComment
with:
issue-number: ${{ github.event.number }}
Expand All @@ -51,7 +51,7 @@ jobs:

- name: Update comment
if: ${{ steps.comment.outputs.markdown != '' }}
uses: peter-evans/create-or-update-comment@71345be0265236311c031f5c7866368bd1eff043
uses: peter-evans/create-or-update-comment@e8674b075228eee787fea43ef493e45ece1004c9
with:
comment-id: ${{ steps.findComment.outputs.comment-id }}
issue-number: ${{ github.event.number }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/dont-delete-features.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:

- name: Find possible previous comment
if: ${{ steps.comment.outputs.markdown != '' }}
uses: peter-evans/find-comment@3eae4d37986fb5a8592848f6a574fdf654e61f9e
uses: peter-evans/find-comment@b30e6a3c0ed37e7c023ccd3f1db5c6c0b0c23aad
id: findComment
with:
issue-number: ${{ github.event.number }}
Expand All @@ -51,7 +51,7 @@ jobs:

- name: Update comment
if: ${{ steps.comment.outputs.markdown != '' }}
uses: peter-evans/create-or-update-comment@71345be0265236311c031f5c7866368bd1eff043
uses: peter-evans/create-or-update-comment@e8674b075228eee787fea43ef493e45ece1004c9
with:
comment-id: ${{ steps.findComment.outputs.comment-id }}
issue-number: ${{ github.event.number }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/needs-sme-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
- name: Check out repo
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0

- uses: peter-evans/create-or-update-comment@71345be0265236311c031f5c7866368bd1eff043
- uses: peter-evans/create-or-update-comment@e8674b075228eee787fea43ef493e45ece1004c9
with:
issue-number: ${{ github.event.issue.number }}
body: |
Expand All @@ -43,7 +43,7 @@ jobs:
- name: Check out repo
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0

- uses: peter-evans/create-or-update-comment@71345be0265236311c031f5c7866368bd1eff043
- uses: peter-evans/create-or-update-comment@e8674b075228eee787fea43ef493e45ece1004c9
with:
issue-number: ${{ github.event.pull_request.number }}
body: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/notify-about-deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:

- name: Find content directory changes comment
if: ${{ steps.get-number.outputs.number != '' }}
uses: peter-evans/find-comment@3eae4d37986fb5a8592848f6a574fdf654e61f9e
uses: peter-evans/find-comment@b30e6a3c0ed37e7c023ccd3f1db5c6c0b0c23aad
id: findComment
with:
issue-number: ${{ steps.get-number.outputs.number }}
Expand All @@ -56,7 +56,7 @@ jobs:

- name: Update comment
if: ${{ steps.get-number.outputs.number != '' }}
uses: peter-evans/create-or-update-comment@71345be0265236311c031f5c7866368bd1eff043
uses: peter-evans/create-or-update-comment@e8674b075228eee787fea43ef493e45ece1004c9
with:
comment-id: ${{ steps.findComment.outputs.comment-id }}
issue-number: ${{ steps.get-number.outputs.number }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/readability.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ jobs:

- name: Find existing readability comment
if: ${{ steps.changed_files.outputs.filtered_changed_files }}
uses: peter-evans/find-comment@3eae4d37986fb5a8592848f6a574fdf654e61f9e
uses: peter-evans/find-comment@b30e6a3c0ed37e7c023ccd3f1db5c6c0b0c23aad
id: findComment
with:
issue-number: ${{ github.event_name == 'workflow_dispatch' && inputs.pull_request_number || github.event.number }}
Expand All @@ -90,7 +90,7 @@ jobs:

- name: Create or update readability comment
if: ${{ steps.changed_files.outputs.filtered_changed_files && steps.read_report.outputs.report }}
uses: peter-evans/create-or-update-comment@71345be0265236311c031f5c7866368bd1eff043
uses: peter-evans/create-or-update-comment@e8674b075228eee787fea43ef493e45ece1004c9
with:
comment-id: ${{ steps.findComment.outputs.comment-id }}
issue-number: ${{ github.event_name == 'workflow_dispatch' && inputs.pull_request_number || github.event.number }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/review-comment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:
echo "APP_URL=https://adjective-noun-hash-4000.app.github.dev" >> $GITHUB_ENV
fi
- name: Find code changes comment
uses: peter-evans/find-comment@3eae4d37986fb5a8592848f6a574fdf654e61f9e
uses: peter-evans/find-comment@b30e6a3c0ed37e7c023ccd3f1db5c6c0b0c23aad
id: findComment
with:
issue-number: ${{ github.event.pull_request.number }}
Expand All @@ -65,7 +65,7 @@ jobs:
HEAD_SHA: ${{ github.event.pull_request.head.sha }}
run: npm run content-changes-table-comment
- name: Update comment
uses: peter-evans/create-or-update-comment@71345be0265236311c031f5c7866368bd1eff043
uses: peter-evans/create-or-update-comment@e8674b075228eee787fea43ef493e45ece1004c9
with:
comment-id: ${{ steps.findComment.outputs.comment-id }}
issue-number: ${{ github.event.pull_request.number }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/site-policy-reminder.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
github.repository == 'github/docs-internal'
runs-on: ubuntu-latest
steps:
- uses: peter-evans/create-or-update-comment@71345be0265236311c031f5c7866368bd1eff043
- uses: peter-evans/create-or-update-comment@e8674b075228eee787fea43ef493e45ece1004c9
env:
GITHUB_TOKEN: ${{ secrets.API_TOKEN_SITEPOLICY }}
with:
Expand Down
12 changes: 1 addition & 11 deletions content/copilot/concepts/agents/about-copilot-cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -266,17 +266,7 @@ You can mitigate the risks associated with using the automatic approval options

The default model used by {% data variables.copilot.copilot_cli %} is {% data variables.copilot.cca_current_model %}. {% data variables.product.github %} reserves the right to change this model.

You can change the model by setting the `COPILOT_MODEL` environment variable to one of the supported values. For example, change the model to {% data variables.copilot.copilot_gpt_5 %} by setting `COPILOT_MODEL` to `gpt-5`.

{% rowheaders %}

| Model name | `COPILOT_MODEL` value |
|------------------------------------------------------------------|-----------------------|
| {% data variables.copilot.cca_current_model %} | `claude-sonnet-4` |
| {% data variables.copilot.copilot_claude_sonnet_45 %} | `claude-sonnet-4.5` |
| {% data variables.copilot.copilot_gpt_5 %} | `gpt-5` |

{% endrowheaders %}
You can change the model used by {% data variables.copilot.copilot_cli %} by using the `/model` slash command. Enter this command and select a model from the list.

Each time you submit a prompt to {% data variables.product.prodname_copilot_short %} in {% data variables.copilot.copilot_cli_short %}'s interactive mode, and each time you use {% data variables.copilot.copilot_cli_short %} in programmatic mode, your monthly quota of {% data variables.product.prodname_copilot_short %} premium requests is reduced by one. For information about premium requests, see [AUTOTITLE](/copilot/managing-copilot/monitoring-usage-and-entitlements/about-premium-requests).

Expand Down
12 changes: 12 additions & 0 deletions content/copilot/how-tos/use-copilot-agents/use-copilot-cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,14 @@ If all of the files you want to work with are in a different location, you can s
/cwd /path/to/directory
```

### Run shell commands

You can prepend your input with `!` to directly run shell commands, without making a call to the model.

```shell
!git clone https://github.com/github/copilot-cli
```

### Resume an interactive session

You can return to a previous interactive session, and continue your conversation with {% data variables.product.prodname_copilot_short %}, by using the `--resume` command line option, then choosing the session you want to resume from the list that's displayed.
Expand Down Expand Up @@ -135,6 +143,10 @@ To extend the functionality available to you in {% data variables.copilot.copilo

Details of your configured MCP servers are stored in the `mcp-config.json` file, which is located, by default, in the `~/.config` directory. This location can be changed by setting the `XDG_CONFIG_HOME` environment variable. For information about the JSON structure of a server definition, see [AUTOTITLE](/copilot/how-tos/use-copilot-agents/coding-agent/extend-coding-agent-with-mcp#writing-a-json-configuration-for-mcp-servers).

### View context and usage statistics for the current session

You can use the `/usage` slash command to view how many premium requests you've used in the current session, the duration of the session, how many lines of code have been edited, and the breakdown of token usage per model. When you have less than 20% of a model's token limit remaining, {% data variables.copilot.copilot_cli_short %} will display a warning that the context will be truncated when the token limit is reached.

## Find out more

For a complete list of the command line options and slash commands that you can use with {% data variables.copilot.copilot_cli_short %}, do one of the following:
Expand Down
16 changes: 16 additions & 0 deletions src/audit-logs/components/GroupedEvents.module.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
.eventItem {
margin-bottom: 3rem;
}

.eventAction {
font-style: normal;
}

.eventDetail {
margin-left: 1rem;
font-style: normal;
}

.eventDescription {
margin-left: 1rem;
}
14 changes: 8 additions & 6 deletions src/audit-logs/components/GroupedEvents.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ import { HeadingLink } from '@/frame/components/article/HeadingLink'
import { useTranslation } from '@/languages/components/useTranslation'
import type { AuditLogEventT } from '../types'

import styles from './GroupedEvents.module.scss'

type Props = {
auditLogEvents: AuditLogEventT[]
category: string
Expand Down Expand Up @@ -47,15 +49,15 @@ export default function GroupedEvents({ auditLogEvents, category, categoryNote }
)}
<div>
{auditLogEvents.map((event) => (
<div key={event.action} style={{ marginBottom: '3rem' }}>
<div key={event.action} className={styles.eventItem}>
<dl>
<dt style={{ fontStyle: 'normal' }}>
<dt className={styles.eventAction}>
<code>{event.action}</code>
</dt>
<dd>{event.description}</dd>

<dt style={{ marginLeft: '1rem', fontStyle: 'normal' }}>{t('fields')}</dt>
<dd style={{ marginLeft: '1rem' }}>
<dt className={styles.eventDetail}>{t('fields')}</dt>
<dd className={styles.eventDescription}>
{event.fields
? event.fields.map((field, index) => (
<span key={field}>
Expand All @@ -68,8 +70,8 @@ export default function GroupedEvents({ auditLogEvents, category, categoryNote }

{event.docs_reference_links && event.docs_reference_links !== 'N/A' && (
<>
<dt style={{ marginLeft: '1rem', fontStyle: 'normal' }}>{t('reference')}</dt>
<dd style={{ marginLeft: '1rem' }}>{renderReferenceLinks(event)}</dd>
<dt className={styles.eventDetail}>{t('reference')}</dt>
<dd className={styles.eventDescription}>{renderReferenceLinks(event)}</dd>
</>
)}
</dl>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@ import {
isStringQuoted,
isStringPunctuated,
} from '../helpers/utils'
import type { RuleParams, RuleErrorCallback } from '../../types'
import type { RuleParams, RuleErrorCallback, Rule, MarkdownToken } from '../../types'

export const imageAltTextEndPunctuation = {
export const imageAltTextEndPunctuation: Rule = {
names: ['GHD032', 'image-alt-text-end-punctuation'],
description: 'Alternate text for images should end with punctuation',
tags: ['accessibility', 'images'],
parser: 'markdownit',
function: (params: RuleParams, onError: RuleErrorCallback) => {
forEachInlineChild(params, 'image', function forToken(token: any) {
const imageAltText = token.content.trim()
forEachInlineChild(params, 'image', function forToken(token: MarkdownToken) {
const imageAltText = token.content?.trim()

// If the alt text is empty, there is nothing to check and you can't
// produce a valid range.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,21 +1,24 @@
// @ts-ignore - markdownlint-rule-helpers doesn't have TypeScript declarations
import { addError, filterTokens } from 'markdownlint-rule-helpers'

import { getRange } from '../helpers/utils'
import type { RuleParams, RuleErrorCallback, MarkdownToken, Rule } from '../../types'

export const internalLinksOldVersion = {
export const internalLinksOldVersion: Rule = {
names: ['GHD006', 'internal-links-old-version'],
description: 'Internal links must not have a hardcoded version using old versioning syntax',
tags: ['links', 'url', 'versioning'],
parser: 'markdownit',
function: (params, onError) => {
filterTokens(params, 'inline', (token) => {
function: (params: RuleParams, onError: RuleErrorCallback) => {
filterTokens(params, 'inline', (token: MarkdownToken) => {
if (
params.name.endsWith('migrating-from-github-enterprise-1110x-to-2123.md') ||
params.name.endsWith('all-releases.md')
)
return
for (const child of token.children) {
for (const child of token.children || []) {
if (child.type !== 'link_open') continue
if (!child.attrs) continue
// Things matched by this RegExp:
// - /enterprise/2.19/admin/blah
// - https://docs.github.com/enterprise/11.10.340/admin/blah
Expand Down
Original file line number Diff line number Diff line change
@@ -1,36 +1,41 @@
// @ts-ignore - markdownlint-rule-helpers doesn't have TypeScript declarations
import { addError, filterTokens } from 'markdownlint-rule-helpers'
import { getRange, quotePrecedesLinkOpen } from '../helpers/utils'
import { escapeRegExp } from 'lodash-es'
import type { RuleParams, RuleErrorCallback, MarkdownToken, Rule } from '../../types'

export const linkQuotation = {
export const linkQuotation: Rule = {
names: ['GHD043', 'link-quotation'],
description: 'Internal link titles must not be surrounded by quotations',
tags: ['links', 'url'],
parser: 'markdownit',
function: (params, onError) => {
filterTokens(params, 'inline', (token) => {
function: (params: RuleParams, onError: RuleErrorCallback) => {
filterTokens(params, 'inline', (token: MarkdownToken) => {
const { children } = token
let previous_child = children[0]
if (!children) return
let previous_child: MarkdownToken = children[0]
let inLinkWithPrecedingQuotes = false
let linkUrl = ''
let content = []
let line = ''
let content: string[] = []
for (let i = 1; i < children.length; i++) {
const child = children[i]
if (child.type === 'link_open' && quotePrecedesLinkOpen(previous_child.content)) {
if (child.type === 'link_open' && quotePrecedesLinkOpen(previous_child.content || '')) {
if (!child.attrs) continue
inLinkWithPrecedingQuotes = true
linkUrl = escapeRegExp(child.attrs[0][1])
line = child.line
} else if (inLinkWithPrecedingQuotes && child.type === 'text') {
content.push(escapeRegExp(child.content.trim()))
content.push(escapeRegExp((child.content || '').trim()))
} else if (inLinkWithPrecedingQuotes && child.type === 'code_inline') {
content.push('`' + escapeRegExp(child.content.trim()) + '`')
content.push('`' + escapeRegExp((child.content || '').trim()) + '`')
} else if (child.type === 'link_close') {
const title = content.join(' ')
const regex = new RegExp(`"\\[${title}\\]\\(${linkUrl}\\)({%.*%})?(!|\\.|\\?|,)?"`)
if (regex.test(child.line)) {
const match = child.line.match(regex)[0]
const matchResult = child.line.match(regex)
if (!matchResult) continue
const match = matchResult[0]
const range = getRange(child.line, match)
if (!range) continue
let newLine = match
if (newLine.startsWith('"')) {
newLine = newLine.slice(1)
Expand Down Expand Up @@ -58,7 +63,6 @@ export const linkQuotation = {
}
inLinkWithPrecedingQuotes = false
content = []
line = ''
linkUrl = ''
}
previous_child = child
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@ import { TokenKind } from 'liquidjs'

import { getLiquidTokens, getPositionData } from '../helpers/liquid-utils'
import { addFixErrorDetail } from '../helpers/utils'
import type { RuleParams, RuleErrorCallback, Rule } from '../../types'

interface LiquidToken {
kind: number
content: string
contentRange: [number, number]
begin: number
end: number
}

/*
Liquid tags should start and end with one whitespace. For example:
Expand All @@ -16,14 +25,16 @@ Liquid tags should start and end with one whitespace. For example:
{%data arg1 arg2 %}
*/

export const liquidTagWhitespace = {
export const liquidTagWhitespace: Rule = {
names: ['GHD042', 'liquid-tag-whitespace'],
description:
'Liquid tags should start and end with one whitespace. Liquid tag arguments should be separated by only one whitespace.',
tags: ['liquid', 'format'],
function: (params, onError) => {
function: (params: RuleParams, onError: RuleErrorCallback) => {
const content = params.lines.join('\n')
const tokens = getLiquidTokens(content).filter((token) => token.kind === TokenKind.Tag)
const tokens = (getLiquidTokens(content) as LiquidToken[]).filter(
(token: LiquidToken) => token.kind === TokenKind.Tag,
)
for (const token of tokens) {
const { lineNumber, column, length } = getPositionData(token, params.lines)

Expand Down
Loading
Loading