You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When you need to read GitHub Docs, use these endpoints on `docs.github.com` in order of preference:
36
+
37
+
1.`/llms.txt` — Start here. Returns a structured overview of the site with links to pagelist endpoints for each product version.
38
+
2.`/api/pagelist/:lang/:version` — Returns a list of all pages for a given language and version (e.g., `/api/pagelist/en/free-pro-team@latest`). Use `/api/pagelist/versions` and `/api/pagelist/languages` for available options.
4.`/api/article/body?pathname=...` — Returns the rendered markdown body of a page. Handles all page types including REST, GraphQL, and webhook reference pages.
Copy file name to clipboardExpand all lines: .github/instructions/code.instructions.md
+3-1Lines changed: 3 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,14 +9,16 @@ For code reviews, follow guidelines, tests, and validate instructions. For creat
9
9
## Guidelines
10
10
11
11
- If available, use ripgrep (`rg`) instead of `grep`.
12
-
- When using gh cli, always _escape backticks_.
12
+
- When using gh cli in double-quoted strings, escape backticks to prevent bash command substitution. In single-quoted strings, backticks do not need escaping.
13
13
- All scripts should be listed in `package.json` and use `tsx`.
14
14
- Whenever you create or comment on an issue or pull request, indicate you are GitHub Copilot.
15
15
- Be careful fetching full HTML pages off the internet. Prefer to use MCP or gh cli whenever possible for github.com. Limit the number of tokens when grabbing HTML.
16
16
- Avoid pull requests with over 300 lines of code changed. When significantly larger, offer to split up into smaller pull requests if possible.
17
17
- All new code should be written in TypeScript and not JavaScript.
18
18
- We use absolute imports, relative to the `src` directory, using the `@` symbol. For example, `getRedirect` which lives in `src/redirects/lib/get-redirect.ts` can be imported with `import getRedirect from '@/redirects/lib/get-redirect'`. The same rule applies for TypeScript (`.ts`) imports, e.g. `import type { GeneralSearchHit } from '@/search/types'`
19
19
- For updates to the content linter, read important information in `src/content-linter/README.md`.
20
+
- Do not commit to `main` branch.
21
+
- Do not use git force push, and avoid git rebase.
Copy file name to clipboardExpand all lines: .github/instructions/content.instructions.md
+8Lines changed: 8 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -72,6 +72,14 @@ Examples:
72
72
* ❌ Incorrect: `For more information, see [Using GitHub Copilot](/copilot/using-github-copilot).`
73
73
* ❌ Incorrect: `For more information, see {% link /copilot/using-github-copilot %}.`
74
74
75
+
## RAI application and platform cards
76
+
77
+
Articles with `contentType: rai` in their frontmatter are **application or platform cards**—legally mandated documents describing the responsible use of AI-powered features. The content linter enforces the required section structure (GHD064) and reusable isolation (GHD035).
78
+
79
+
***Template**: See `content/contributing/writing-for-github-docs/templates.md` for the full application/platform card template with all required sections and boilerplate reusables.
80
+
***Reusables**: RAI articles must only reference reusables from `data/reusables/rai/`. Place new RAI reusables there too.
81
+
***Frontmatter**: New application cards use `contentType: rai`. The older `type: rai` is for legacy transparency notes not yet migrated.
82
+
75
83
## Parenthetical dashes
76
84
77
85
Where a sentence of normal body text contains a parenthetical dash, the dash should always be an em dash without spaces at either side. This rule does not apply to text within code blocks.
PR_TITLE="docs: update ${PIPELINE_ID} content from source docs"
125
-
126
-
PR_BODY="_GitHub Copilot generated this pull request._"$'\n\n'
127
-
PR_BODY+="> [!NOTE]"$'\n'
128
-
PR_BODY+="> This PR is **automatically generated** by the [content pipeline update workflow](${{ github.server_url }}/${{ github.repository }}/actions/workflows/content-pipelines.yml). Each run adds a new commit with any documentation changes detected."$'\n\n'
129
-
PR_BODY+="## What this does"$'\n\n'
130
-
PR_BODY+="Runs the \`content-pipeline-update\` agent (${PIPELINE_ID}) against the latest source docs and updates official articles under \`content/\` that have fallen out of sync."$'\n\n'
131
-
PR_BODY+="## Review"$'\n\n'
132
-
PR_BODY+="* Review each commit for accuracy — the agent uses AI, so spot-check important changes"$'\n'
133
-
PR_BODY+="* To adjust agent behavior, see [Modifying results](${{ github.server_url }}/${{ github.repository }}/blob/main/src/content-pipelines/README.md#modifying-results)"$'\n'
134
-
PR_BODY+="* Once satisfied, merge to keep docs up to date"$'\n'
135
-
PR_BODY+="* A new PR will be created on the next run if there are further changes"
142
+
NEW_ITEM="* [\`${SHORT_RANGE}\`](${COMPARE_URL})"
136
143
137
144
if [ -n "$PR_NUMBER" ]; then
138
-
echo "PR #$PR_NUMBER already exists — new commit pushed"
echo "Ensuring PR #$PR_NUMBER is marked ready for review"
159
+
gh pr ready "$PR_NUMBER" || echo "Unable to mark PR #$PR_NUMBER as ready (it may already be ready)"
139
160
else
140
161
echo "Creating new PR"
162
+
163
+
PR_BODY="_GitHub Copilot generated this pull request._"$'\n\n'
164
+
PR_BODY+="> [!NOTE]"$'\n'
165
+
PR_BODY+="> This PR is **automatically generated** by the [content pipeline update workflow](${{ github.server_url }}/${{ github.repository }}/actions/workflows/content-pipelines.yml). Each run adds a new commit with any documentation changes detected."$'\n\n'
166
+
PR_BODY+="## What this does"$'\n\n'
167
+
PR_BODY+="Runs the \`content-pipeline-update\` agent (${PIPELINE_ID}) against the latest source docs and updates official articles under \`content/\` that have fallen out of sync."$'\n\n'
168
+
PR_BODY+="## Source changes"$'\n\n'
169
+
PR_BODY+="Changes in the source repo that triggered this update:"$'\n\n'
170
+
PR_BODY+="<!-- SOURCE_CHANGES -->"$'\n'
171
+
PR_BODY+="${NEW_ITEM}"$'\n'
172
+
PR_BODY+="<!-- /SOURCE_CHANGES -->"$'\n\n'
173
+
PR_BODY+="## Review"$'\n\n'
174
+
PR_BODY+="* Review each commit for accuracy — the agent uses AI, so spot-check important changes"$'\n'
175
+
PR_BODY+="* To adjust agent behavior, see [Modifying results](${{ github.server_url }}/${{ github.repository }}/blob/main/src/content-pipelines/README.md#modifying-results)"$'\n'
176
+
PR_BODY+="* Once satisfied, merge to keep docs up to date"$'\n'
177
+
PR_BODY+="* A new PR will be created on the next run if there are further changes"
0 commit comments