Skip to content

Commit d90fd77

Browse files
Merge branch 'main' into patch-1
2 parents 7391f25 + ac353d7 commit d90fd77

File tree

33 files changed

+499
-791
lines changed

33 files changed

+499
-791
lines changed

.github/actions/node-npm-setup/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ runs:
1717
key: ${{ runner.os }}-node_modules-${{ hashFiles('package*.json') }}-${{ hashFiles('.github/actions/node-npm-setup/action.yml') }}
1818

1919
- name: Setup Node.js
20-
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
20+
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
2121
with:
2222
node-version-file: 'package.json'
2323
cache: npm

content/copilot/concepts/prompting/response-customization.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,11 @@ category:
3030

3131
There are three main types of custom instructions that you can use to customize {% data variables.product.prodname_copilot_short %} responses on the {% data variables.product.github %} website:
3232

33-
* **[Personal custom instructions](#about-personal-custom-instructions)** apply to all conversations you have with {% data variables.copilot.copilot_chat_short %} across the {% data variables.product.github %} website. They allow you to specify your individual preferences, such as preferred language or response style, ensuring that the responses are tailored to your personal needs.
33+
* **[Personal instructions](#about-personal-instructions)** apply to all conversations you have with {% data variables.copilot.copilot_chat_short %} across the {% data variables.product.github %} website. They allow you to specify your individual preferences, such as preferred language or response style, ensuring that the responses are tailored to your personal needs.
3434
* **[Repository custom instructions](#about-repository-custom-instructions)** apply to conversations within the context of a specific repository. They are useful for defining project-specific coding standards, frameworks, or tools. For example, you can specify that a repository uses TypeScript and a particular library, ensuring consistent responses for all contributors.
3535
* **[Organization custom instructions](#about-organization-custom-instructions)** (public preview) apply to conversations within the context of an organization on the {% data variables.product.github %} website. They are ideal for enforcing organization-wide preferences, such as a common language or security guidelines. Organization custom instructions can only be set by organization owners for organizations with a {% data variables.copilot.copilot_enterprise_short %} subscription.
3636

37-
## About personal custom instructions
37+
## About personal instructions
3838

3939
{% data reusables.copilot.personal-instructions-note %}
4040

@@ -67,12 +67,12 @@ Some examples of instructions you could add are:
6767

6868
The following list shows the complete order of precedence, with instructions higher in this list taking precedence over those lower in the list:
6969

70-
* Personal custom instructions
71-
* Repository custom instructions:
72-
* Path-specific instructions in any applicable `.github/instructions/**/NAME.instructions.md` file
73-
* Repository-wide instructions in the `.github/copilot-instructions.md` file
74-
* Agent instructions (for example, in an `AGENTS.md` file)
75-
* Organization custom instructions
70+
* **Personal** instructions
71+
* **Repository** custom instructions:
72+
* **Path-specific** instructions in any applicable `.github/instructions/**/NAME.instructions.md` file
73+
* **Repository-wide** instructions in the `.github/copilot-instructions.md` file
74+
* **Agent** instructions (for example, in an `AGENTS.md` file)
75+
* **Organization** custom instructions
7676

7777
{% data reusables.copilot.custom-instructions-conflict %}
7878

@@ -81,7 +81,7 @@ The following list shows the complete order of precedence, with instructions hig
8181
Custom instructions consist of natural language instructions and are most effective when they are short, self-contained statements. Consider the scope over which you want the instruction to apply when choosing whether to add an instruction on the personal, repository, or organization level.
8282

8383
Here are some common use cases and examples for each type of custom instructions:
84-
* **Personal custom instructions:**
84+
* **Personal instructions:**
8585
* Preferred individual language: `Always respond in Portuguese.`
8686
* Individual response preferences: `Explain a single concept per line. Be clear and concise.`
8787
* **Repository custom instructions:**

content/copilot/how-tos/configure-custom-instructions/add-repository-instructions.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -249,11 +249,11 @@ Once saved, these instructions will apply to the current project in Eclipse that
249249

250250
* **Repository-wide custom instructions**, which apply to all requests made in the context of a repository.
251251

252-
These are specified in a `copilot-instructions.md` file in the `.github` directory of the repository. See [Creating repository-wide custom instructions](#creating-repository-wide-custom-instructions).
252+
These are specified in a `copilot-instructions.md` file in the `.github` directory of the repository. See [Creating repository-wide custom instructions](#creating-repository-wide-custom-instructions-1).
253253

254254
* **Path-specific custom instructions**, which apply to requests made in the context of files that match a specified path.
255255

256-
These are specified in one or more `NAME.instructions.md` files within the `.github/instructions` directory in the repository. See [Creating path-specific custom instructions](#creating-path-specific-custom-instructions).
256+
These are specified in one or more `NAME.instructions.md` files within the `.github/instructions` directory in the repository. See [Creating path-specific custom instructions](#creating-path-specific-custom-instructions-1).
257257

258258
If the path you specify matches a file that {% data variables.product.prodname_copilot_short %} is working on, and a repository-wide custom instructions file also exists, then the instructions from both files are used.
259259

@@ -303,11 +303,11 @@ Once saved, these instructions will apply to the current project in Eclipse that
303303

304304
* **Repository-wide custom instructions** apply to all requests made in the context of a repository.
305305

306-
These are specified in a `copilot-instructions.md` file in the `.github` directory of the repository. See [Creating repository-wide custom instructions](#creating-repository-wide-custom-instructions-1).
306+
These are specified in a `copilot-instructions.md` file in the `.github` directory of the repository. See [Creating repository-wide custom instructions](#creating-repository-wide-custom-instructions-2).
307307

308308
* **Path-specific custom instructions** apply to requests made in the context of files that match a specified path.
309309

310-
These are specified in one or more `NAME.instructions.md` files within the `.github/instructions` directory in the repository. See [Creating path-specific custom instructions](#creating-path-specific-custom-instructions-1).
310+
These are specified in one or more `NAME.instructions.md` files within the `.github/instructions` directory in the repository. See [Creating path-specific custom instructions](#creating-path-specific-custom-instructions-2).
311311

312312
If the path you specify matches a file that {% data variables.product.prodname_copilot_short %} is working on, and a repository-wide custom instructions file also exists, then the instructions from both files are used.
313313

data/reusables/contributing/content-linter-rules.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,12 +52,10 @@
5252
| GHD041 | third-party-action-pinning | Code examples that use third-party actions must always pin to a full length commit SHA | error | feature, actions |
5353
| GHD042 | liquid-tag-whitespace | Liquid tags should start and end with one whitespace. Liquid tag arguments should be separated by only one whitespace. | error | liquid, format |
5454
| GHD043 | link-quotation | Internal link titles must not be surrounded by quotations | error | links, url |
55-
| GHD044 | octicon-aria-labels | Octicons should always have an aria-label attribute even if aria-hidden. | warning | accessibility, octicons |
5655
| 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 |
5756
| GHD046 | outdated-release-phase-terminology | Outdated release phase terminology should be replaced with current GitHub terminology | warning | terminology, consistency, release-phases |
5857
| GHD047 | table-column-integrity | Tables must have consistent column counts across all rows | warning | tables, accessibility, formatting |
5958
| GHD051 | frontmatter-versions-whitespace | Versions frontmatter should not contain unnecessary whitespace | warning | frontmatter, versions |
60-
| GHD053 | header-content-requirement | Headers must have content between them, such as an introduction | warning | headers, structure, content |
6159
| GHD054 | third-party-actions-reusable | Code examples with third-party actions must include disclaimer reusable | warning | actions, reusable, third-party |
6260
| GHD056 | frontmatter-landing-recommended | Only landing pages can have recommended articles, there should be no duplicate recommended articles, and all recommended articles must exist | error | frontmatter, landing, recommended |
6361
| GHD057 | ctas-schema | CTA URLs must conform to the schema | error | ctas, schema, urls |
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
> [!NOTE]
22
> This feature is currently in {% data variables.release-phases.public_preview %} and is subject to change.
33
>
4-
> **Support:** Organization custom instructions are currently only supported for {% data variables.copilot.copilot_chat_short %} on {% data variables.product.prodname_dotcom_the_website %} and {% data variables.copilot.copilot_code-review_short %} on {% data variables.product.prodname_dotcom_the_website %}.
4+
> **Support:** Organization custom instructions are currently only supported for {% data variables.copilot.copilot_chat_short %} on {% data variables.product.prodname_dotcom_the_website %}, {% data variables.copilot.copilot_code-review_short %} on {% data variables.product.prodname_dotcom_the_website %} and {% data variables.copilot.copilot_coding_agent %} on {% data variables.product.prodname_dotcom_the_website %}.
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
import { beforeAll, describe, expect, test } from 'vitest'
2+
3+
import { get } from '@/tests/helpers/e2etest'
4+
5+
const makeURL = (pathname: string): string =>
6+
`/api/article/body?${new URLSearchParams({ pathname })}`
7+
8+
describe('article body api', () => {
9+
beforeAll(() => {
10+
// If you didn't set the `ROOT` variable, the tests will fail rather
11+
// cryptically. So as a warning for engineers running these tests,
12+
// alert in case it was accidentally forgotten.
13+
if (!process.env.ROOT) {
14+
console.warn(
15+
'WARNING: The article body tests require the ROOT environment variable to be set to the fixture root',
16+
)
17+
}
18+
})
19+
20+
test('happy path', async () => {
21+
const res = await get(makeURL('/en/get-started/start-your-journey/hello-world'))
22+
expect(res.statusCode).toBe(200)
23+
expect(res.body).toContain('## Introduction')
24+
expect(res.body).toContain('This is just a test.')
25+
expect(res.headers['content-type']).toContain('text/markdown')
26+
})
27+
28+
test('octicons auto-generate aria-labels', async () => {
29+
const res = await get(makeURL('/en/get-started/start-your-journey/hello-world'))
30+
expect(res.statusCode).toBe(200)
31+
32+
// Check that octicons without aria-label get auto-generated ones
33+
expect(res.body).toContain('aria-label="check icon"')
34+
expect(res.body).toContain('aria-label="git branch icon"')
35+
})
36+
37+
test('octicons with custom aria-labels use the custom value', async () => {
38+
const res = await get(makeURL('/en/get-started/start-your-journey/hello-world'))
39+
expect(res.statusCode).toBe(200)
40+
41+
// Check that custom aria-labels are preserved
42+
expect(res.body).toContain('aria-label="Supported"')
43+
expect(res.body).toContain('aria-label="Not supported"')
44+
})
45+
46+
test('octicons with other attributes still get auto-generated aria-labels', async () => {
47+
const res = await get(makeURL('/en/get-started/start-your-journey/hello-world'))
48+
expect(res.statusCode).toBe(200)
49+
50+
// Check that octicons with width attribute still get aria-labels
51+
expect(res.body).toContain('aria-label="rocket icon"')
52+
expect(res.body).toContain('width="32"')
53+
})
54+
55+
test('a pathname that does not exist', async () => {
56+
const res = await get(makeURL('/en/never/heard/of'))
57+
expect(res.statusCode).toBe(404)
58+
const { error } = JSON.parse(res.body)
59+
expect(error).toBe("No page found for '/en/never/heard/of'")
60+
})
61+
62+
test('non-article pages return error', async () => {
63+
// Index pages are not articles and should not be renderable
64+
const res = await get(makeURL('/en/get-started'))
65+
expect(res.statusCode).toBe(403)
66+
const { error } = JSON.parse(res.body)
67+
expect(error).toContain("isn't yet available in markdown")
68+
})
69+
})

src/content-linter/lib/linting-rules/header-content-requirement.ts

Lines changed: 0 additions & 113 deletions
This file was deleted.

src/content-linter/lib/linting-rules/index.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,9 @@ import { tableColumnIntegrity } from '@/content-linter/lib/linting-rules/table-c
4242
import { thirdPartyActionPinning } from '@/content-linter/lib/linting-rules/third-party-action-pinning'
4343
import { liquidTagWhitespace } from '@/content-linter/lib/linting-rules/liquid-tag-whitespace'
4444
import { linkQuotation } from '@/content-linter/lib/linting-rules/link-quotation'
45-
import { octiconAriaLabels } from '@/content-linter/lib/linting-rules/octicon-aria-labels'
4645
import { liquidIfversionVersions } from '@/content-linter/lib/linting-rules/liquid-ifversion-versions'
4746
import { outdatedReleasePhaseTerminology } from '@/content-linter/lib/linting-rules/outdated-release-phase-terminology'
4847
import { frontmatterVersionsWhitespace } from '@/content-linter/lib/linting-rules/frontmatter-versions-whitespace'
49-
import { headerContentRequirement } from '@/content-linter/lib/linting-rules/header-content-requirement'
5048
import { thirdPartyActionsReusable } from '@/content-linter/lib/linting-rules/third-party-actions-reusable'
5149
import { frontmatterLandingRecommended } from '@/content-linter/lib/linting-rules/frontmatter-landing-recommended'
5250
import { ctasSchema } from '@/content-linter/lib/linting-rules/ctas-schema'
@@ -106,12 +104,11 @@ export const gitHubDocsMarkdownlint = {
106104
thirdPartyActionPinning, // GHD041
107105
liquidTagWhitespace, // GHD042
108106
linkQuotation, // GHD043
109-
octiconAriaLabels, // GHD044
107+
// GHD044 removed - octicon aria-labels are now auto-generated
110108
codeAnnotationCommentSpacing, // GHD045
111109
outdatedReleasePhaseTerminology, // GHD046
112110
tableColumnIntegrity, // GHD047
113111
frontmatterVersionsWhitespace, // GHD051
114-
headerContentRequirement, // GHD053
115112
thirdPartyActionsReusable, // GHD054
116113
frontmatterLandingRecommended, // GHD056
117114
ctasSchema, // GHD057

src/content-linter/lib/linting-rules/octicon-aria-labels.ts

Lines changed: 0 additions & 58 deletions
This file was deleted.

0 commit comments

Comments
 (0)