Skip to content

Commit cbcbab3

Browse files
authored
Merge pull request #44747 from github/repo-sync
Repo sync
2 parents 72b7a47 + ec05367 commit cbcbab3

20 files changed

Lines changed: 292 additions & 22 deletions

.github/instructions/content.instructions.md

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,3 +92,61 @@ Examples:
9292
* ❌ Incorrect: "The cat – which sat on a branch – smiled with a broad grin." (en dash with spaces)
9393
* ❌ Incorrect: "The cat-which sat on a branch-smiled with a broad grin." (hyphen without spaces)
9494
* ❌ Incorrect: "The cat - which sat on a branch - smiled with a broad grin." (hyphen with spaces)
95+
96+
## Versioning
97+
98+
Avoid `{% ifversion fpt %}`, `{% ifversion ghec %}`, and `{% ifversion fpt or ghec %}` in content files whenever possible. Instead of suggesting or adding version-gating within an article:
99+
100+
* Write content that applies to all versions the article is versioned for
101+
* If content is truly version-specific, consider whether it is low-harm to show it to all readers (e.g., an enterprise-only row in a reference table)
102+
* Only use `{% ifversion %}` as a last resort when content would be actively misleading for readers on a different version
103+
104+
**FPT and GHEC content**: When dotcom content applies to both products, version the page for `fpt` and `ghec` in the frontmatter. Do NOT use in-article Liquid versioning. Do NOT suggest adding `{% ifversion fpt or ghec %}` blocks as a fix for content that mentions a dotcom-only feature. Instead, suggest rewriting the content using the alternatives to inline versioning options listed below.
105+
106+
**GHES content**: If versioning is necessary for GitHub Enterprise Server content, use feature-based versioning (FBV). GHES content should rely on feature flags defined in `data/features/` rather than inline `{% ifversion ghes %}` blocks. Feature flags allow centralized control of when content appears for specific GHES releases.
107+
108+
### Alternatives to inline versioning
109+
110+
Before resorting to in-article versioning, first consider whether the content is actually different across versions. Often procedures can be simplified to work at both levels.
111+
112+
Use these strategies instead of `{% ifversion %}`, depending on the level of content:
113+
114+
**At the article level:**
115+
116+
* When the feature is only available in certain products, use the "Who can use this feature?" box to convey that the content of the article applies only to specific products
117+
* When an article only exists because the functionality is only available in older GHES releases (and not on {% data variables.product.prodname_dotcom_the_website %} or newer GHES releases), just remove that article
118+
119+
**At the heading level:**
120+
121+
* Use prose similar to "Who can use this feature?" to convey that the content of a section applies only to specific products
122+
123+
**At the paragraph or sentence level:**
124+
125+
* If you're briefly introducing a feature and then linking to an article, there's no need to specify versioning. Let readers learn availability when they follow the link, via the "Who can use this feature?" box
126+
* When necessary, start sentences with "With {% data variables.product.prodname_ghe_cloud %}...", "On {% data variables.product.prodname_dotcom_the_website %}...", etc.
127+
* End list items with "({% data variables.product.prodname_ghe_cloud %} only)", "({% data variables.product.prodname_dotcom_the_website %} only)", etc.
128+
* Specify if the feature is not available for GHES with "NAME-OF-FEATURE is not available for {% data variables.product.prodname_ghe_server %}", "... (not available in {% data variables.product.prodname_ghe_server %})", etc.
129+
130+
### Example
131+
132+
When documenting a feature that only applies to dotcom (not GHES):
133+
134+
❌ Don't wrap content in version blocks:
135+
136+
```markdown
137+
{% ifversion fpt or ghec %}
138+
139+
## Immutable subject claims
140+
141+
Repositories created after July 15, 2026 now use an immutable default subject format.
142+
143+
{% endif %}
144+
```
145+
146+
✅ Do use prose to indicate availability:
147+
148+
```markdown
149+
## Immutable subject claims
150+
151+
Repositories created after July 15, 2026 now use an immutable default subject format. This rollout does not include {% data variables.product.prodname_ghe_server %}.
152+
```

.github/workflows/changelog-agent.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -404,6 +404,16 @@ jobs:
404404
fs.writeFileSync('prompt.txt', userPrompt);
405405
core.setOutput('date_str', dateStr);
406406
407+
- name: Set up Node.js for Copilot CLI
408+
if: steps.check_parent.outputs.has_parent == 'true' && steps.check_existing.outputs.exists == 'false'
409+
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
410+
with:
411+
node-version: 24
412+
413+
- name: Install GitHub Copilot CLI
414+
if: steps.check_parent.outputs.has_parent == 'true' && steps.check_existing.outputs.exists == 'false'
415+
run: npm install -g @github/copilot
416+
407417
- name: Generate changelog draft via Copilot
408418
if: steps.check_parent.outputs.has_parent == 'true' && steps.check_existing.outputs.exists == 'false'
409419
id: generate_draft

.github/workflows/copy-api-issue-to-internal.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,9 @@ jobs:
4545
4646
- name: Create an issue in the docs-content repo
4747
run: |
48-
new_issue_url="$(gh issue create --title "$ISSUE_TITLE" --body "$ISSUE_BODY" --repo github/docs-content --label "workflow-generated")"
48+
new_issue_url="$(gh issue create --title "$ISSUE_TITLE" --body "$ISSUE_BODY
49+
50+
Copied to this repo by the [$GITHUB_WORKFLOW workflow run]($GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID)." --repo github/docs-content --label "workflow-generated")"
4951
echo 'NEW_ISSUE='$new_issue_url >> $GITHUB_ENV
5052
env:
5153
GITHUB_TOKEN: ${{secrets.DOCS_BOT_PAT_BASE}}

.github/workflows/delete-orphan-translation-files.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ jobs:
127127
echo "Creating pull request..."
128128
gh pr create \
129129
--title "Delete orphan files ($current_daystamp)" \
130-
--body '👋 humans. This PR was generated from docs-internal/.github/workflows/delete-orphan-translation-files.yml.
130+
--body '👋 humans. This PR was generated by the [Delete orphan translation files](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}) workflow run.
131131
' \
132132
--repo "${{ matrix.language_repo }}" \
133133
--label "workflow-generated" \

.github/workflows/generate-code-scanning-query-lists.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,4 +259,6 @@ jobs:
259259
No action is required from the first responder for the Docs content team. This PR is automatically added to the Docs content review board. Any writer can review this by checking that the PR looks sensible. If CI does not pass or other problems arise, contact #docs-engineering on slack.
260260
261261
262-
When the DRI for the CodeQL CLI release is ready to publish, they will ask us to merge this PR in #docs-content.'
262+
When the DRI for the CodeQL CLI release is ready to publish, they will ask us to merge this PR in #docs-content.
263+
264+
_Generated by the [Generate code scanning query lists](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}) workflow run._'

.github/workflows/moda-allowed-ips.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,9 @@ jobs:
4848
git push
4949
gh pr create \
5050
--title "Update list of allowed IPs" \
51-
--body 'This PR updates the list of allowed IPs in Moda. It is automatically generated.' \
51+
--body "This PR updates the list of allowed IPs in Moda. It is automatically generated.
52+
53+
_Generated by the [Update Moda allowed IPs](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}) workflow run._" \
5254
--label "workflow-generated" \
5355
--head=$branchname
5456
echo "Pull request created"

.github/workflows/orphaned-features-check.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,8 @@ jobs:
9090
to make sure they aren't referenced anywhere
9191
and then approve and merge the pull request.
9292
For more information, see [Doc: Orphaned Features](https://github.com/github/docs-engineering/blob/main/docs/orphaned-features.md).
93+
94+
Generated by the [orphaned features workflow run]($GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID).
9395
EOM
9496
)
9597

.github/workflows/orphaned-files-check.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,8 @@ jobs:
9898
If you are the first responder, please spot check some of the unused assets to make sure they aren't referenced anywhere. Then, approve and merge the pull request.
9999
100100
For more information, see [Doc: Orphaned Assets](https://github.com/github/docs-engineering/blob/main/docs/orphaned-assets.md) and [Doc: Reusables CLI](https://github.com/github/docs-internal/tree/main/src/content-render/scripts/reusables-cli).
101+
102+
Generated by the [orphaned files workflow run]($GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID).
101103
EOM
102104
)
103105
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Purge Fastly (all)
2+
3+
# **What it does**: Purges the ENTIRE Fastly cache for docs (every URL) on demand.
4+
# **Why we have it**: So docs engineering can clear a bad cache state without asking core engineering to run a purge-all in the Fastly UI.
5+
# **Who does it impact**: All readers. Origin sees a traffic spike while the cache refills, so only run this when a targeted purge will not do.
6+
7+
on:
8+
workflow_dispatch:
9+
inputs:
10+
confirm:
11+
description: "Type 'purge everything' to confirm a full hard purge of the Fastly cache."
12+
required: true
13+
14+
permissions:
15+
contents: read
16+
17+
# Only one purge-all may run at a time. Do not cancel an in-flight purge:
18+
# a half-finished purge leaves the cache in an unknown state.
19+
concurrency:
20+
group: purge-fastly-all
21+
cancel-in-progress: false
22+
23+
env:
24+
FASTLY_TOKEN: ${{ secrets.FASTLY_TOKEN }}
25+
FASTLY_SERVICE_ID: ${{ secrets.FASTLY_SERVICE_ID }}
26+
27+
jobs:
28+
purge-all:
29+
if: github.repository == 'github/docs-internal'
30+
runs-on: ubuntu-latest
31+
steps:
32+
- name: Validate confirmation input
33+
if: ${{ inputs.confirm != 'purge everything' }}
34+
run: |
35+
echo "::error::Confirmation text did not match. Re-run and type exactly: purge everything"
36+
exit 1
37+
38+
- name: Check out repo
39+
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
40+
41+
- uses: ./.github/actions/node-npm-setup
42+
43+
- name: Purge entire Fastly cache
44+
run: npm run purge-fastly-all

.github/workflows/sme-review-tracking-issue.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,9 @@ jobs:
5353
- Routed to another channel / team
5454
- Reviewer stating they'll need to get back to us at a later time
5555
- Review provided was unclear or missing key information, and a follow-up is necessary
56+
57+
---
58+
_Generated by the [${context.workflow}](${context.serverUrl}/${context.repo.owner}/${context.repo.repo}/actions/runs/${context.runId}) workflow run._
5659
`,
5760
labels: ['on track','open source', 'sme-review', 'workflow-generated'],
5861
});

0 commit comments

Comments
 (0)