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
54 changes: 54 additions & 0 deletions .github/workflows/auto-add-ready-for-doc-review.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Auto-add ready-for-doc-review label

# **What it does**: Automatically adds the "ready-for-doc-review" label to DIY docs PRs that contain content or data changes when they are opened in a non-draft state or converted from draft to ready for review.
# **Why we have it**: To ensure DIY docs PRs are automatically added to the docs-content review board without requiring manual labeling.
# **Who does it impact**: Contributors making content changes and docs-content reviewers.

on:
pull_request:
types:
- opened
- ready_for_review
paths:
- 'content/**'
- 'data/**'

permissions:
contents: read
pull-requests: write

jobs:
add-review-label:
name: Add ready-for-doc-review label to DIY docs PRs
if: github.repository == 'github/docs-internal' && github.event.pull_request.draft == false && github.actor != 'github-openapi-bot' && github.actor != 'docs-bot'
runs-on: ubuntu-latest

steps:
- name: Check out repo
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0

- name: Check team membership
id: membership_check
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
with:
github-token: ${{ secrets.DOCS_BOT_PAT_BASE }}
script: |
try {
await github.rest.teams.getMembershipForUserInOrg({
org: 'github',
team_slug: 'docs',
username: context.payload.sender.login,
});
return true
} catch(err) {
console.log(err)
return false
}

- name: Add ready-for-doc-review label
if: steps.membership_check.outputs.result == 'false'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PR_URL: ${{ github.event.pull_request.html_url }}
run: |
gh pr edit $PR_URL --add-label ready-for-doc-review
58 changes: 8 additions & 50 deletions .github/workflows/first-responder-v2-prs-collect.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Add docs-internal PRs to the docs-content FR project v2
name: Add maintenance PRs to the docs-content FR project v2

# **What it does**: Adds docs-internal pull requests that were opened by people outside of the docs team to the docs-content FR project v2
# **Why we have it**: So we don't lose track of new pull requests for docs-content to review
# **What it does**: Adds docs-internal pull requests authored by docs-bot to the docs-content FR project v2
# **Why we have it**: So we don't lose track of maintenance pull requests for docs-content to review
# **Who does it impact**: Docs content

on:
Expand All @@ -18,76 +18,34 @@ permissions:

jobs:
first-responder-triage-pr:
name: Add PR to FR project v2
if: github.repository == 'github/docs-internal' && github.event.pull_request.draft == false && github.actor != 'dependabot[bot]' && github.event.pull_request.head.ref != 'repo-sync' && !contains(github.event.pull_request.labels.*.name, 'skip FR board')
name: Add maintenance PR to FR project v2
if: github.repository == 'github/docs-internal' && github.event.pull_request.draft == false && github.event.pull_request.user.id == 77750099 && github.event.pull_request.head.ref != 'repo-sync' && !contains(github.event.pull_request.labels.*.name, 'skip FR board')
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v5

- name: Check if the event originated from a team member
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd
id: check-membership
with:
github-token: ${{secrets.DOCS_BOT_PAT_BASE}}
result-encoding: string
script: |
const repoName = context.payload.repository.name
const ownerName = context.payload.repository.owner.login
const prAuthor = context.payload.pull_request.user.login
const teamMembers = await github.request(
`/orgs/github/teams/docs/members?per_page=100`
)
const teamLogins = teamMembers.data.map(member => member.login)
if (teamLogins.some(login => login === prAuthor)) {
console.log(`This pull request was authored by a member of the github/docs team.`)
return 'true'
}
console.log(`This pull request was authored by an external contributor.`)
return 'false'

# Check if docs-bot authored the PR
# If yes, set Type field to "Maintenance"
# If no, set Type field to "External contributor PR"
- name: Check if docs-bot is PR author
env:
PR_AUTHOR_ID: ${{ github.event.pull_request.user.id }}
run: |
if [ $PR_AUTHOR_ID == 77750099 ]; then
echo "TYPE_FIELD_VALUE=3f142cf2" >> $GITHUB_ENV
else
echo "TYPE_FIELD_VALUE=bbd0922a" >> $GITHUB_ENV
fi

- name: Add the docs-content-fr label
if: ${{ steps.check-membership.outputs.result == 'false' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PR_URL: ${{ github.event.pull_request.html_url }}
run: |
gh pr edit $PR_URL --add-label docs-content-fr

# Add to the FR project
# and set type to "Maintenance" or "External contributor PR"
# and set type to "Maintenance"
# and set date to now
- name: Triage to docs-content FR project
if: steps.check-membership.outputs.result == 'false'
env:
GITHUB_TOKEN: ${{ secrets.DOCS_BOT_PAT_BASE }}
PR_URL: ${{ github.event.pull_request.html_url }}
PROJECT_NUMBER: 11672
PROJECT_ID: PVT_kwDNJr_OAGNkBg
TYPE_FIELD_ID: PVTSSF_lADNJr_OAGNkBs4D-Nyn
DATE_FIELD_ID: PVTF_lADNJr_OAGNkBs4D-N1h
TYPE_FIELD_VALUE: 3f142cf2
run: |
echo "Adding item to project..."

ITEM_ID=$(gh project item-add $PROJECT_NUMBER --owner github --url $PR_URL --format json | jq .id)

echo "Editing type..."

gh project item-edit --project-id $PROJECT_ID --id $ITEM_ID --field-id $TYPE_FIELD_ID --single-select-option-id ${{ env.TYPE_FIELD_VALUE }}
gh project item-edit --project-id $PROJECT_ID --id $ITEM_ID --field-id $TYPE_FIELD_ID --single-select-option-id $TYPE_FIELD_VALUE

echo "Editing date..."

Expand Down
18 changes: 15 additions & 3 deletions .github/workflows/hubber-contribution-help.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,23 @@ jobs:
- name: Comment on the PR
if: steps.membership_check.outputs.result == 'false'
run: |
gh pr comment $PR --body "### Next: add the review label
gh pr comment $PR --body "## Requesting a review from the Docs team

**🛎️ Is this PR ready for review?** A PR is ready for a docs review _after_ the self-review checklist is complete.
### 🚧 Draft PRs

When this is ready for review, add the **\`ready-for-doc-review\`** label to this PR. The PR will then be automatically added to the [Docs Content review board](https://github.com/orgs/github/projects/2936). _Please allow at least 3 working days for a review, and longer if this is a substantial change._"
To add the PR to the Docs Content review board, click **Ready for review** in the merge box.

### 🚀 Non-draft PRs

The PR is **ready** and has automatically been added to the Docs Content review board. The docs team will review it as soon as possible.

### Lead time for review

Please allow at least 3 business days for a Docs Content review.

### Need help?

Reach out in [#docs-content](https://github-grid.enterprise.slack.com/archives/C0E9DK082) on Slack.

env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ In normal use, enterprise owners do not need to create new indices or schedule r
1. If you want the index to be searchable, select the **Make this index searchable** checkbox.
1. If you want the index to be writable, select the **Make this index writable** checkbox.
1. Click **Create index**.
1. If your instance uses a high availability or cluster configuration, you will need to run a script to ensure the number of search indices is correctly configured across the instance.
1. If your instance uses a high availability or cluster configuration, you will need to run a script to ensure the number of search indices is correctly configured across the instance. This step does not apply to those using the new HA configuration released in {% data variables.product.prodname_ghe_server %} 3.19.

Access the administrative shell for your primary appliance via SSH, then run one of the following commands.

Expand Down
4 changes: 4 additions & 0 deletions content/copilot/concepts/prompting/response-customization.md
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,8 @@ The following examples demonstrate how to use prompt files.
```

For a curated collection of examples, see [AUTOTITLE](/copilot/tutorials/customization-library/prompt-files).

{% data reusables.copilot.custom-instructions-effective %}

## Next steps
Expand Down Expand Up @@ -353,6 +355,8 @@ Common use cases for repository custom instructions include:

{% data reusables.copilot.repository-custom-instructions-example %}

For a curated collection of examples, see [AUTOTITLE](/copilot/tutorials/customization-library/custom-instructions).

{% data reusables.copilot.custom-instructions-effective %}

## Next steps
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,7 @@ Did you successfully add personal custom instructions?
<a href="https://docs.github.io/success-test/yes.html" target="_blank" class="btn btn-outline mt-3 mr-3 no-underline"><span>Yes</span></a> <a href="https://docs.github.io/success-test/no.html" target="_blank" class="btn btn-outline mt-3 mr-3 no-underline"><span>No</span></a>

{% endnote %}

## Further reading

* [AUTOTITLE](/copilot/tutorials/customization-library/custom-instructions)—a curated collection of examples
Original file line number Diff line number Diff line change
Expand Up @@ -584,11 +584,11 @@ To enable prompt files, configure the workspace settings.

1. Submit the chat prompt.

For more information about prompt files, see [Custom instructions for {% data variables.product.prodname_copilot %} in VS Code](https://code.visualstudio.com/docs/copilot/copilot-customization#_reusable-prompt-files-experimental) in the {% data variables.product.prodname_vscode %} documentation.
For more information about prompt files, see [Use prompt files in {% data variables.product.prodname_vscode %}](https://code.visualstudio.com/docs/copilot/customization/prompt-files) in the {% data variables.product.prodname_vscode %} documentation.

## Further reading

* [AUTOTITLE](/copilot/tutorials/customization-library)
* [AUTOTITLE](/copilot/tutorials/customization-library)—a curated collection of examples

{% endvscode %}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ For information on configuring the {% data variables.product.github %} MCP serve
![Screenshot of the {% data variables.copilot.copilot_chat_short %} box in {% data variables.product.prodname_vscode %}. The "Agent" option is outlined in dark orange.](/assets/images/help/copilot/copilot-chat-agent-option.png)

1. To view your list of available MCP servers, click the tools icon in the top left corner of the chat box. This will open the MCP server list, where you can see all the MCP servers and associated tools that are currently available in your {% data variables.product.prodname_vscode %} instance.
* Optionally, you can define toolsets, groups of related tools that you can reference in chat. Toolsets make it easier to group related MCP tools together and quickly enable or disable them. For information on how to define and use a toolset, see the [{% data variables.product.prodname_vscode_shortname %} docs](https://code.visualstudio.com/docs/copilot/chat/chat-agent-mode#_define-tool-sets).
* Optionally, you can define toolsets, groups of related tools that you can reference in chat. Toolsets make it easier to group related MCP tools together and quickly enable or disable them. For information on how to define and use a toolset, see the [{% data variables.product.prodname_vscode_shortname %} docs](https://code.visualstudio.com/docs/copilot/chat/chat-tools#_group-tools-with-tool-sets).

For more information on configuring MCP servers in {% data variables.product.prodname_vscode %}, see [Use MCP servers in {% data variables.product.prodname_vscode %}](https://aka.ms/vscode-add-mcp) in the {% data variables.product.prodname_vscode %} documentation.

Expand Down
2 changes: 2 additions & 0 deletions content/copilot/reference/allowlist-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ If your company employs security measures like a firewall or proxy server, you s
| `https://*.individual.githubcopilot.com`[^2] | API service for {% data variables.product.prodname_copilot_short %} suggestions |
| `https://*.business.githubcopilot.com`[^3] | API service for {% data variables.product.prodname_copilot_short %} suggestions |
| `https://*.enterprise.githubcopilot.com`[^4] | API service for {% data variables.product.prodname_copilot_short %} suggestions |
| `https://*.SUBDOMAIN.ghe.com` | For {% data variables.product.prodname_copilot_short %} users on {% data variables.enterprise.data_residency_site %} |
| `https://SUBDOMAIN.ghe.com` | For {% data variables.product.prodname_copilot_short %} users on {% data variables.enterprise.data_residency_site %} |

Depending on the security policies and editors your organization uses, you may need to allowlist additional domains and URLs. For more information on specific editors, see [Further reading](#further-reading).

Expand Down
12 changes: 6 additions & 6 deletions data/reusables/contributing/content-linter-rules.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
| GHD022 | liquid-ifversion-versions | Liquid `ifversion`, `elsif`, and `else` tags should be valid and not contain unsupported versions. | error | liquid, versioning |
| GHD031 | image-alt-text-exclude-words | Alternate text for images should not begin with words like "image" or "graphic" | error | accessibility, images |
| GHD032 | image-alt-text-end-punctuation | Alternate text for images should end with punctuation | error | accessibility, images |
| GHD033 | incorrect-alt-text-length | Images alternate text should be between 40-150 characters | warning | accessibility, images |
| GHD033 | incorrect-alt-text-length | Images alternate text should be between 40-150 characters | error | accessibility, images |
| GHD035 | rai-reusable-usage | RAI articles and reusables can only reference reusable content in the data/reusables/rai directory | error | feature, rai |
| GHD036 | image-no-gif | Image must not be a gif, styleguide reference: contributing/style-guide-and-content-model/style-guide.md#images | error | images |
| GHD038 | expired-content | Expired content must be remediated. | warning | expired |
Expand All @@ -52,11 +52,11 @@
| GHD041 | third-party-action-pinning | Code examples that use third-party actions must always pin to a full length commit SHA | error | feature, actions |
| 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 |
| GHD043 | link-quotation | Internal link titles must not be surrounded by quotations | error | links, url |
| 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 |
| GHD046 | outdated-release-phase-terminology | Outdated release phase terminology should be replaced with current GitHub terminology | warning | terminology, consistency, release-phases |
| GHD047 | table-column-integrity | Tables must have consistent column counts across all rows | warning | tables, accessibility, formatting |
| GHD051 | frontmatter-versions-whitespace | Versions frontmatter should not contain unnecessary whitespace | warning | frontmatter, versions |
| GHD054 | third-party-actions-reusable | Code examples with third-party actions must include disclaimer reusable | warning | actions, reusable, third-party |
| GHD045 | code-annotation-comment-spacing | Code comments in annotation blocks must have exactly one space after the comment character(s) | error | code, comments, annotate, spacing |
| GHD046 | outdated-release-phase-terminology | Outdated release phase terminology should be replaced with current GitHub terminology | error | terminology, consistency, release-phases |
| GHD047 | table-column-integrity | Tables must have consistent column counts across all rows | error | tables, accessibility, formatting |
| GHD051 | frontmatter-versions-whitespace | Versions frontmatter should not contain unnecessary whitespace | error | frontmatter, versions |
| GHD054 | third-party-actions-reusable | Code examples with third-party actions must include disclaimer reusable | error | actions, reusable, third-party |
| 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 |
| GHD057 | ctas-schema | CTA URLs must conform to the schema | error | ctas, schema, urls |
| GHD058 | journey-tracks-liquid | Journey track properties must use valid Liquid syntax | error | frontmatter, journey-tracks, liquid |
Expand Down
16 changes: 14 additions & 2 deletions src/content-linter/scripts/lint-report.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,15 @@ import { getAllRuleNames } from '@/content-linter/lib/helpers/rule-utils'
// GitHub issue body size limit is ~65k characters, so we'll use 60k as a safe limit
const MAX_ISSUE_BODY_SIZE = 60000

// If the number of warnings exceeds this number, print a warning so we can give them attention
const MAX_WARNINGS_BEFORE_ALERT = 20

/**
* Config that only applies to automated weekly reports.
*/
export const reportingConfig = {
// Include only rules with these severities in reports
includeSeverities: ['error'],
includeSeverities: ['error', 'warning'],
// Include these rules regardless of severity in reports
includeRules: ['expired-content'],
}
Expand Down Expand Up @@ -89,18 +92,27 @@ async function main() {

const parsedResults = JSON.parse(lintResults)

// Keep track of warnings so we can print an alert when they exceed a manageable number
let totalWarnings = 0

// Filter results based on reporting configuration
const filteredResults: Record<string, LintFlaw[]> = {}
for (const [file, flaws] of Object.entries(parsedResults)) {
const filteredFlaws = (flaws as LintFlaw[]).filter((flaw) => shouldIncludeInReport(flaw))

// Only include files that have remaining flaws after filtering
if (filteredFlaws.length > 0) {
totalWarnings += filteredFlaws.filter((flaw) => flaw.severity === 'warning').length
filteredResults[file] = filteredFlaws
}
}
const totalFiles = Object.keys(filteredResults).length
let reportBody = 'The following files have markdown lint issues that require attention:\n\n'

const showTooManyWarningsAlert = totalWarnings > MAX_WARNINGS_BEFORE_ALERT
const tooManyWarningsAlertText = showTooManyWarningsAlert
? `**Alert**: ${totalWarnings} warning-level issues have been found. These must be addressed ASAP so they do not continue to accumulate.\n\n`
: ''
let reportBody = `${tooManyWarningsAlertText}The following files have markdown lint issues that require attention:\n\n`
let filesIncluded = 0
let truncated = false

Expand Down
Loading
Loading