Skip to content

Commit

Permalink
Merge branch 'github:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
Hawthorne001 authored Mar 29, 2024
2 parents d260b1f + f977dd1 commit 3eccf41
Show file tree
Hide file tree
Showing 2,666 changed files with 2,090,861 additions and 420,258 deletions.
10 changes: 5 additions & 5 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ Read our [Code of Conduct](./CODE_OF_CONDUCT.md) to keep our community approacha

In this guide you will get an overview of the contribution workflow from opening an issue, creating a PR, reviewing, and merging the PR.

Use the table of contents icon <img src="/contributing/images/table-of-contents.png" width="25" height="25" /> on the top left corner of this document to get to a specific section of this guide quickly.
Use the table of contents icon <img alt="Table of contents icon" src="/contributing/images/table-of-contents.png" width="25" height="25" /> on the top left corner of this document to get to a specific section of this guide quickly.

## New contributor guide

To get an overview of the project, read the [README](README.md) file. Here are some resources to help you get started with open source contributions:
To get an overview of the project, read the [README](../README.md) file. Here are some resources to help you get started with open source contributions:

- [Finding ways to contribute to open source on GitHub](https://docs.github.com/en/get-started/exploring-projects-on-github/finding-ways-to-contribute-to-open-source-on-github)
- [Set up Git](https://docs.github.com/en/get-started/getting-started-with-git/set-up-git)
Expand All @@ -20,7 +20,7 @@ To get an overview of the project, read the [README](README.md) file. Here are s

## Getting started

To navigate our codebase with confidence, see [the introduction to working in the docs repository](/contributing/README.md) :confetti_ball:. For more information on how we write our markdown files, see "[Using Markdown and Liquid in GitHub Docs](https://docs.github.com/en/contributing/writing-for-github-docs/using-markdown-and-liquid-in-github-docs).
To navigate our codebase with confidence, see [the introduction to working in the docs repository](/contributing/README.md) :confetti_ball:. For more information on how we write our markdown files, see "[Using Markdown and Liquid in GitHub Docs](https://docs.github.com/en/contributing/writing-for-github-docs/using-markdown-and-liquid-in-github-docs)."

Check to see what [types of contributions](/contributing/types-of-contributions.md) we accept before making changes. Some of them don't even require writing a single line of code :sparkles:.

Expand Down Expand Up @@ -56,13 +56,13 @@ For more information about using a codespace for working on GitHub documentation
- Using the command line:
- [Fork the repo](https://docs.github.com/en/github/getting-started-with-github/fork-a-repo#fork-an-example-repository) so that you can make your changes without affecting the original project until you're ready to merge them.

2. Install or update to **Node.js**, at the version specified in `.node-version`. For more information, see [the development guide](contributing/development.md).
2. Install or update to **Node.js**, at the version specified in `.node-version`. For more information, see [the development guide](../contributing/development.md).

3. Create a working branch and start with your changes!

### Commit your update

Commit the changes once you are happy with them. Don't forget to use the "[Self review checklist](https://docs.github.com/en/contributing/collaborating-on-github-docs/self-review-checklist) to speed up the review process :zap:.
Commit the changes once you are happy with them. Don't forget to use the "[Self review checklist](https://docs.github.com/en/contributing/collaborating-on-github-docs/self-review-checklist)" to speed up the review process :zap:.

### Pull Request

Expand Down
1 change: 0 additions & 1 deletion .github/ISSUE_TEMPLATE/improve-existing-docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ body:
value: |
**HUBBERS!!** This is the github/docs open source repo. You may want to open an issue in the internal-only github/docs-content repo instead.
* For questions, ask in [Discussions](https://github.com/github/docs/discussions).
* Before you file an issue read the [Contributing guide](https://docs.github.com/en/contributing).
* Check to make sure someone hasn't already opened a similar [issue](https://github.com/github/docs/issues).
Expand Down
1 change: 0 additions & 1 deletion .github/ISSUE_TEMPLATE/improve-the-site.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ body:
value: |
**HUBBERS!!** This is the github/docs open source repo. You may want to open an issue in the internal-only github/docs-content repo instead.
* For questions, ask in [Discussions](https://github.com/github/docs/discussions).
* Before you file an issue read the [Contributing guide](https://docs.github.com/en/contributing).
* Check to make sure someone hasn't already opened a similar [issue](https://github.com/github/docs/issues).
Expand Down
16 changes: 8 additions & 8 deletions .github/actions/clone-translations/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,56 +11,56 @@ runs:
using: 'composite'
steps:
- name: Clone Simplified Chinese
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
repository: github/docs-internal.zh-cn
token: ${{ inputs.token }}
path: translations/zh-cn

- name: Clone Spanish
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
repository: github/docs-internal.es-es
token: ${{ inputs.token }}
path: translations/es-es

- name: Clone Portuguese
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
repository: github/docs-internal.pt-br
token: ${{ inputs.token }}
path: translations/pt-br

- name: Clone Russian
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
repository: github/docs-internal.ru-ru
token: ${{ inputs.token }}
path: translations/ru-ru

- name: Clone Japanese
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
repository: github/docs-internal.ja-jp
token: ${{ inputs.token }}
path: translations/ja-jp

- name: Clone French
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
repository: github/docs-internal.fr-fr
token: ${{ inputs.token }}
path: translations/fr-fr

- name: Clone German
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
repository: github/docs-internal.de-de
token: ${{ inputs.token }}
path: translations/de-de

- name: Clone Korean
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
repository: github/docs-internal.ko-kr
token: ${{ inputs.token }}
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/get-docs-early-access/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ runs:
run: node src/early-access/scripts/what-docs-early-access-branch.js

- name: Clone
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
repository: github/docs-early-access
token: ${{ inputs.token }}
Expand Down
21 changes: 21 additions & 0 deletions .github/actions/install-cocofix/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Install CocoFix

description: Installs the private package `@github/cocofix` from the GitHub Package Registry.

inputs:
token:
description: PAT
required: true

runs:
using: 'composite'
steps:
- name: Install CoCoFix
shell: bash
env:
TOKEN: ${{ inputs.token }}
run: |
npm install --no-save \
'--@github:registry=https://npm.pkg.github.com' \
'--//npm.pkg.github.com/:_authToken=${TOKEN}' \
@github/cocofix
2 changes: 1 addition & 1 deletion .github/actions/precompute-pageinfo/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ runs:
- name: Run script
if: ${{ inputs.restore-only == '' }}
shell: bash
run: npm run precompute-pageinfo
run: npm run precompute-pageinfo -- --max-versions 2

- name: Cache .remotejson-cache (save)
if: ${{ inputs.restore-only == '' }}
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/slack-alert/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ runs:
using: composite
steps:
- name: Send Slack notification if workflow fails
uses: someimportantcompany/github-actions-slack-message@1d367080235edfa53df415bd8e0bbab480f29bad
uses: someimportantcompany/github-actions-slack-message@a975b440de2bcef178d451cc70d4c1161b5a30cd
with:
channel: ${{ inputs.slack_channel_id }}
bot-token: ${{ inputs.slack_token }}
Expand Down
3 changes: 3 additions & 0 deletions .github/branch_protection_settings/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Branch Protection Settings

This directory is mean to store a dump of the branch protections rules we have set in this repo. They are used by a workflow to compare against what is actually in settings in order to alert to changes.
140 changes: 140 additions & 0 deletions .github/branch_protection_settings/main.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,140 @@
{
"url": "https://api.github.com/repos/github/docs-internal/branches/main/protection",
"required_status_checks": {
"url": "https://api.github.com/repos/github/docs-internal/branches/main/protection/required_status_checks",
"strict": true,
"contexts": [
"Build and deploy Azure preview environment",
"automated-pipelines",
"github-apps",
"graphql",
"events",
"landings",
"rest",
"search",
"webhooks",
"local-dev",
"check-links",
"shielding",
"observability",
"pageinfo",
"redirects",
"ghes-releases",
"content-render",
"assets",
"languages",
"learning-track",
"release-notes",
"color-schemes",
"content-linter",
"lint-content",
"playwright-tests (playwright-rendering)",
"archives",
"versions",
"audit-logs",
"changelogs",
"data-directory",
"early-access",
"fixtures",
"frame",
"products",
"workflows"
],
"contexts_url": "https://api.github.com/repos/github/docs-internal/branches/main/protection/required_status_checks/contexts",
"checks": [
{
"context": "Build and deploy Azure preview environment",
"app_id": 15368
},
{ "context": "automated-pipelines", "app_id": 15368 },
{ "context": "github-apps", "app_id": 15368 },
{ "context": "graphql", "app_id": 15368 },
{ "context": "events", "app_id": 15368 },
{ "context": "landings", "app_id": 15368 },
{ "context": "rest", "app_id": 15368 },
{ "context": "search", "app_id": 15368 },
{ "context": "webhooks", "app_id": 15368 },
{ "context": "local-dev", "app_id": 15368 },
{ "context": "check-links", "app_id": 15368 },
{ "context": "shielding", "app_id": 15368 },
{ "context": "observability", "app_id": 15368 },
{ "context": "pageinfo", "app_id": 15368 },
{ "context": "redirects", "app_id": 15368 },
{ "context": "ghes-releases", "app_id": 15368 },
{ "context": "content-render", "app_id": 15368 },
{ "context": "assets", "app_id": 15368 },
{ "context": "languages", "app_id": 15368 },
{ "context": "learning-track", "app_id": 15368 },
{ "context": "release-notes", "app_id": 15368 },
{ "context": "color-schemes", "app_id": 15368 },
{ "context": "content-linter", "app_id": 15368 },
{ "context": "lint-content", "app_id": 15368 },
{ "context": "playwright-tests (playwright-rendering)", "app_id": 15368 },
{ "context": "archives", "app_id": 15368 },
{ "context": "versions", "app_id": 15368 },
{ "context": "audit-logs", "app_id": 15368 },
{ "context": "changelogs", "app_id": 15368 },
{ "context": "data-directory", "app_id": 15368 },
{ "context": "early-access", "app_id": 15368 },
{ "context": "fixtures", "app_id": 15368 },
{ "context": "frame", "app_id": 15368 },
{ "context": "products", "app_id": 15368 },
{ "context": "workflows", "app_id": 15368 }
]
},
"restrictions": {
"url": "https://api.github.com/repos/github/docs-internal/branches/main/protection/restrictions",
"users_url": "https://api.github.com/repos/github/docs-internal/branches/main/protection/restrictions/users",
"teams_url": "https://api.github.com/repos/github/docs-internal/branches/main/protection/restrictions/teams",
"apps_url": "https://api.github.com/repos/github/docs-internal/branches/main/protection/restrictions/apps",
"users": [],
"teams": [
{
"name": "docs",
"id": 325922,
"node_id": "MDQ6VGVhbTMyNTkyMg==",
"slug": "docs",
"description": "We're the Docs Team! We work in /docs and /docs-internal and publish docs.github.com. ",
"privacy": "closed",
"notification_setting": "notifications_enabled",
"url": "https://api.github.com/organizations/9919/team/325922",
"html_url": "https://github.com/orgs/github/teams/docs",
"members_url": "https://api.github.com/organizations/9919/team/325922/members{/member}",
"repositories_url": "https://api.github.com/organizations/9919/team/325922/repos",
"permission": "pull",
"parent": null
}
],
"apps": []
},
"required_pull_request_reviews": {
"url": "https://api.github.com/repos/github/docs-internal/branches/main/protection/required_pull_request_reviews",
"dismiss_stale_reviews": false,
"require_code_owner_reviews": true,
"require_last_push_approval": false,
"required_approving_review_count": 1,
"dismissal_restrictions": {
"url": "https://api.github.com/repos/github/docs-internal/branches/main/protection/dismissal_restrictions",
"users_url": "https://api.github.com/repos/github/docs-internal/branches/main/protection/dismissal_restrictions/users",
"teams_url": "https://api.github.com/repos/github/docs-internal/branches/main/protection/dismissal_restrictions/teams",
"users": [],
"teams": [],
"apps": []
}
},
"required_signatures": {
"url": "https://api.github.com/repos/github/docs-internal/branches/main/protection/required_signatures",
"enabled": false
},
"enforce_admins": {
"url": "https://api.github.com/repos/github/docs-internal/branches/main/protection/enforce_admins",
"enabled": false
},
"required_linear_history": { "enabled": false },
"allow_force_pushes": { "enabled": false },
"allow_deletions": { "enabled": false },
"block_creations": { "enabled": true },
"required_conversation_resolution": { "enabled": false },
"lock_branch": { "enabled": false },
"allow_fork_syncing": { "enabled": false }
}
8 changes: 5 additions & 3 deletions .github/review-template.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
## Author self-review

- [ ] The changes in this PR meet the user experience and goals outlined in the content design plan.
- [ ] I've compared my PR's source changes to staging and reviewed for versioning issues, redirects, the [style guide](https://github.com/github/docs/blob/main/contributing/content-style-guide.md), [content model](https://github.com/github/docs/blob/main/contributing/content-model.md), or [translations guide for writers](https://github.com/github/docs/blob/main/contributing/translations/for-writers.md) rendering problems, typos, and wonky screenshots.
- [ ] I've worked through build failures and tests are passing.
- [ ] For REST API content, I've verified that endpoints, parameters, and responses are correct and work as expected and provided curl samples below.
- [ ] The changes in this PR adhere to our [style guide](https://docs.github.com/en/contributing/style-guide-and-content-model/style-guide), [content model](https://docs.github.com/en/contributing/writing-for-github-docs/content-model), and "[Writing content to be translated](https://docs.github.com/en/contributing/writing-for-github-docs/writing-content-to-be-translated)."
- [ ] Compare this PR's source changes to the preview deployment and review for versioning issues, redirects, rendering problems, typos, and wonky screenshots.
- [ ] All screenshots in this PR adhere to the guidance in "[Creating screenshots](https://docs.github.com/en/contributing/writing-for-github-docs/creating-screenshots)."
- [ ] All checks are passing.
- [ ] For REST API content, verify that endpoints, parameters, and responses are correct and work as expected and provided curl samples below.

For more information, check out our [review process](https://github.com/github/docs-team/blob/main/contributing-to-docs/review-process.md).

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/add-review-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1

# Jump through some hoops to work with a multi-line file
- name: Store review template in variable
Expand Down
47 changes: 47 additions & 0 deletions .github/workflows/alert-changed-branch-protections.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Alert Changed Branch Protections

on:
branch_protection_rule:
workflow_dispatch:

permissions:
contents: read

jobs:
check-branch-protections:
runs-on: ubuntu-latest
if: github.repository == 'github/docs-internal'

strategy:
matrix:
# List of branches we want to monitor for protection changes
branch: [main]

steps:
- name: Checkout repository
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1

- name: Fetch branch protections
id: fetch
env:
GH_TOKEN: ${{ secrets.DOCS_BOT_PAT_WORKFLOW }}
run: |
# Fetch branch protections and store them in a file
gh api /repos/GitHub/docs-internal/branches/${{ matrix.branch }}/protection > ${{ matrix.branch }}-actual.json
- name: Format fetched settings with prettier for comparison
id: format
run: |
npx prettier --write ${{ matrix.branch }}-actual.json
- name: Compare branch protections
id: compare
run: |
# Compare the fetched branch protections with the committed ones
git diff --no-index .github/branch_protection_settings/${{ matrix.branch }}.json ${{ matrix.branch }}-actual.json
- uses: ./.github/actions/slack-alert
if: ${{ failure() && github.event_name != 'workflow_dispatch' }}
with:
slack_channel_id: ${{ secrets.DOCS_ALERTS_SLACK_CHANNEL_ID }}
slack_token: ${{ secrets.SLACK_DOCS_BOT_TOKEN }}
Loading

0 comments on commit 3eccf41

Please sign in to comment.