Skip to content

Commit

Permalink
Merge branch 'main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
GovindKrishnan authored Mar 20, 2022
2 parents c91b6d8 + 932c87f commit 2f99d32
Show file tree
Hide file tree
Showing 1,806 changed files with 287,173 additions and 262,927 deletions.
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"davidanson.vscode-markdownlint",
"bierner.markdown-preview-github-styles",
"streetsidesoftware.code-spell-checker",
"hubwriter.open-reusable"
"alistairchristie.open-reusables"
],

// Use 'forwardPorts' to make a list of ports inside the container available locally.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,27 +98,37 @@ This file should be automatically updated, but you can also run `script/update-e
### Before shipping the release branch
- [ ] Add the GHES release notes to `data/release-notes/` and update the versioning frontmatter in `content/admin/release-notes.md` to `enterprise-server: '<=<RELEASE>'`
- [ ] Add the GHES release notes to `data/release-notes/`.
- [ ] Add any required smoke tests to the opening post in the megabranch PR.
Usually, we should smoke test any new GHES admin guides, any large features landing in this GHES version for the first time, and the REST and GraphQL API references.
- [ ] Alert the Neon Squad (formally docs-ecosystem team) 1-2 days before the release to deploy to `github/github`. A PR should already be open in `github/github`, to change `published` to `true` in `app/api/description/config/releases/ghes-<NEXT RELEASE NUMBER>.yaml`. They will need to:
- [ ] A few days before shipping, check for broken links. Run `script/check-english-links.js` in a local copy of the megabranch.
- [ ] [Freeze the repos](https://github.com/github/docs-content/blob/main/docs-content-docs/docs-content-workflows/freezing.md) at least 1-2 days before the release, and post an announcement in Slack so everybody knows. It's helpful to freeze the repos before doing the OpenAPI merges to avoid changes to the megabranch while preparing and deploying.
- [ ] Alert the Neon Squad (formally docs-ecosystem team) 1-2 days before the release to deploy to `github/github`. A PR should already be open in `github/github`, to change the OpenAPI schema config `published` to `true` in `app/api/description/config/releases/ghes-<NEXT RELEASE NUMBER>.yaml`. They will need to:
- [ ] Get the required approval from `@github/ecosystem-api-reviewers` then deploy the PR to dotcom. This process generally takes 30-90 minutes.
- [ ] Once the PR merges, make sure that the auto-generated PR titled "Update OpenAPI Descriptions" in doc-internal contains both the derefrenced and decorated JSON files for the new GHES release. If everything looks good, merge the "Update OpenAPI Description" PR into the GHES release megabranch. **Note:** Be careful about resolving the conflicts correctly—you may wish to delete the existing OpenAPI files for the release version from the megabranch, so there are no conflicts to resolve and to ensure that the incoming artifacts are the correct ones.
- [ ] Add a blocking review to the auto-generated "Update OpenAPI Descriptions" PR in the public REST API description. (Remove this blocking review once the GHES release ships.)
- [ ] [Freeze the repos](https://github.com/github/docs-content/blob/main/docs-content-docs/docs-content-workflows/freezing.md) at least 1-2 days before the release, and post an announcement in Slack so everybody knows.
- [ ] Once the PR merges, make sure that the auto-generated PR titled "Update OpenAPI Descriptions" in doc-internal contains both the dereferenced and decorated JSON files for the new GHES release. If everything looks good, merge the "Update OpenAPI Description" PR into the GHES release megabranch. **Note:** Be careful about resolving the conflicts correctly—you may wish to delete the existing OpenAPI files for the release version from the megabranch (that is, delete the GHES release version `lib/rest/static` decorated and dereferenced JSON files), so there are no conflicts to resolve and to ensure that the incoming artifacts are the correct ones.
- [ ] Alert the Ecosystem-API team in #ecosystem-api about the pending release freeze and incoming blocking review of OpenAPI updates in the public REST API description (the `rest-api-descriptions` repo). They'll need to block any future "Update OpenAPI Descriptions" PRs in the public REST API description until after the ship.
- [ ] Add a blocking review to the auto-generated "Update OpenAPI Descriptions" PR in the public REST API description. (You or they will remove this blocking review once the GHES release ships.)
### 🚢 🛳️ 🚢 Shipping the release branch
- [ ] Remove `[DO NOT MERGE]` and other meta information from the PR title 😜.
- [ ] The `github/docs-internal` repo is frozen, and the `Repo Freeze Check / Prevent merging during deployment freezes (pull_request_target)` test is expected to fail.
Use admin permissions to ship the release branch with this failure. Make sure that the merge's commit title does not include anything like `[DO NOT MERGE]`, and remove all the branch's commit details from the merge's commit message except for the co-author list.
- [ ] Do any required smoke tests listed in the opening post in the megabranch PR.
- [ ] Do any required smoke tests listed in the opening post in the megabranch PR. You can monitor and check when the production deploy completed by viewing the [`docs-internal` deployments page](https://github.com/github/docs-internal/deployments).
- [ ] Once smoke tests have passed, you can [unfreeze the repos](https://github.com/github/docs-content/blob/main/docs-content-docs/docs-content-workflows/freezing.md) and post an announcement in Slack.
- [ ] After unfreezing, push the search index LFS objects for the public `github/docs` repo. The LFS objects were already being pushed for the internal repo after the `sync-english-index-for-<PLAN@RELEASE>` was added to the megabranch. To push the LFS objects, run the [search sync workflow](https://github.com/github/docs-internal/actions/workflows/sync-search-indices.yml). Once you're there, click on `Run workflow` button. A modal will pop up where you can set the following inputs:
Branch: The new version megabranch you're working on
version: `enterprise-server@<RELEASE>`
language: `en`
- [ ] After unfreezing, the megabranch creator should push the search index LFS objects for the public `github/docs` repo. The LFS objects were already pushed for the internal repo after the `sync-english-index-for-<PLAN@RELEASE>` was added to the megabranch. To push the LFS objects to the public repo:
1. First navigate to the [sync search indices workflow](https://github.com/github/docs-internal/actions/workflows/sync-search-indices.yml).
2. Then, to run the workflow with parameters, click on `Run workflow` button.
3. A modal will pop up where you will set the following inputs:
- Branch: The new version megabranch you're working on
- Version: `enterprise-server@<RELEASE>`
- Language: `en`
4. Run the job. The workflow job may fail on the first run—so retry the failed job if needed.
- [ ] After unfreezing, alert the Ecosystem-API team in #ecosystem-api the docs freeze is finished/thawed and the release has shipped.
- [ ] You (or they) can now remove your blocking review on the auto-generated "Update OpenAPI Descriptions" PR in public REST API description (the `rest-api-descriptions` repo). (although it's likely newer PRs have been created since yours with the blocking review, in which case the Ecosystem-API team will close your PR and perform the next step on the most recent PR).
- [ ] The Ecosystem-API team will merge the latest auto-generated "Update OpenAPI Descriptions" PR (which will contain the OpenAPI schema config that changed `published` to `true` for the release).
- [ ] After unfreezing, if there were significant or highlighted GraphQL changes in the release, consider manually running the [GraphQL update workflow](https://github.com/github/docs-internal/actions/workflows/update-graphql-files.yml) to update our GraphQL schemas. By default this workflow only runs once every 24 hours.
- [ ] After the release, in the `docs-content` repo, add the now live version number to the "Specific GHES version(s)" section in the following files: [`.github/ISSUE_TEMPLATE/release-tier-1-or-2-tracking.yml`](https://github.com/github/docs-content/blob/main/.github/ISSUE_TEMPLATE/release-tier-1-or-2-tracking.yml) and [`.github/ISSUE_TEMPLATE/release-tier-3-or-tier-4.yml`](https://github.com/github/docs-content/blob/main/.github/ISSUE_TEMPLATE/release-tier-3-or-tier-4.yml). When the PR is approved, merge it in.
2 changes: 1 addition & 1 deletion .github/actions-scripts/projects.js
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ export function generateUpdateProjectNextItemFieldMutation({
// Strip all non-alphanumeric out of the item ID when creating the mutation ID to avoid a GraphQL parsing error
// (statistically, this should still give us a unique mutation ID)
return `
set_${fieldID.substr(1)}_item_${item.replaceAll(
set_${fieldID.slice(1)}_item_${item.replaceAll(
/[^a-z0-9]/g,
''
)}: updateProjectNextItemField(input: {
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/azure-preview-env-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ on:
description: 'The commit SHA to build'
type: string
required: true
push:
branches:
- gh-readonly-queue/main/**

permissions:
contents: read
Expand All @@ -50,7 +53,7 @@ jobs:
# to link a PR to a list of environments later.
url: ${{ env.APP_URL }}
env:
PR_NUMBER: ${{ github.event.number || github.event.inputs.PR_NUMBER }}
PR_NUMBER: ${{ github.event.number || github.event.inputs.PR_NUMBER || github.run_id }}
COMMIT_REF: ${{ github.event.pull_request.head.sha || github.event.inputs.COMMIT_REF }}
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
IS_INTERNAL_BUILD: ${{ github.repository == 'github/docs-internal' }}
Expand Down Expand Up @@ -162,7 +165,7 @@ jobs:
rsync -rptovR ./user-code/content/./**/*.md ./content
rsync -rptovR ./user-code/assets/./**/*.png ./assets
rsync -rptovR ./user-code/data/./**/*.{yml,md} ./data
rsync -rptovR ./user-code/components/./**/*.{ts,tsx} ./components
rsync -rptovR ./user-code/components/./**/*.{scss,ts,tsx} ./components
rsync -rptovR --ignore-missing-args ./user-code/lib/./**/*.{js,ts} ./lib
rsync -rptovR --ignore-missing-args ./user-code/middleware/./**/*.{js,ts} ./middleware
rsync -rptovR ./user-code/pages/./**/*.tsx ./pages
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/browser-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,5 +59,8 @@ jobs:
path: .next/cache
key: ${{ runner.os }}-nextjs-${{ hashFiles('package*.json') }}

- name: Run build script
run: npm run build

- name: Run browser-test
run: npm run browser-test
2 changes: 1 addition & 1 deletion .github/workflows/crowdin-cleanup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
run: script/i18n/homogenize-frontmatter.js

- name: Check in homogenized files
uses: EndBug/add-and-commit@756d9ea820f11931e591eaf57f25e0f5b903d5b2
uses: EndBug/add-and-commit@050a66787244b10a4874a2a5f682130263edc192
with:
# The arguments for the `git add` command
add: 'translations'
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/link-check-all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ on:
push:
branches:
- main
- gh-readonly-queue/main/**
pull_request:

permissions:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/openapi-decorate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,10 @@ jobs:
run: script/rest/update-files.js --decorate-only

- name: Check in the decorated files
uses: EndBug/add-and-commit@756d9ea820f11931e591eaf57f25e0f5b903d5b2
uses: EndBug/add-and-commit@050a66787244b10a4874a2a5f682130263edc192
with:
# The arguments for the `git add` command
add: 'lib/rest/static/decorated'
add: '["lib/rest/static/apps", "lib/rest/static/decorated"]'

# The message for the commit
message: 'Add decorated OpenAPI schema files'
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/orphaned-assets-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ name: 'Orphaned assets check'

on:
pull_request:
push:
branches:
- gh-readonly-queue/main/**

permissions:
contents: read
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/repo-freeze-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ on:
- unlocked
branches:
- main
push:
branches:
- gh-readonly-queue/main/**

permissions:
contents: none
Expand Down
8 changes: 3 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ name: Node.js Tests
on:
workflow_dispatch:
pull_request:
push:
branches:
- gh-readonly-queue/main/**

permissions:
contents: read
Expand Down Expand Up @@ -132,11 +135,6 @@ jobs:
- name: Run build script
run: npm run build

- name: Warm possible disk caching
env:
NODE_ENV: test
run: ./script/warm-before-tests.mjs

- name: Run tests
env:
DIFF_FILE: get_diff_files.txt
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/triage-unallowed-internal-changes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ on:
- opened
- reopened
- synchronize
push:
branches:
- gh-readonly-queue/main/**

permissions:
# This is needed by dorny/paths-filter
Expand All @@ -36,7 +39,7 @@ jobs:
id: filter
with:
# Base branch used to get changed files
base: ${{ github.event.pull_request.base.ref }}
base: ${{ github.event.pull_request.base.ref || github.base_ref || github.ref }}

# Enables setting an output in the format in `${FILTER_NAME}_files
# with the names of the matching files formatted as JSON array
Expand Down
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ COPY --chown=node:node feature-flags.json ./
COPY --chown=node:node data ./data
COPY --chown=node:node next.config.js ./
COPY --chown=node:node server.mjs ./server.mjs
COPY --chown=node:node start-server.mjs ./start-server.mjs

EXPOSE $PORT

Expand Down
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/images/help/repository/code-scanning-alert.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/images/help/repository/code-scanning-pr-alert.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/images/help/repository/code-scanning-show-paths.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/oauth-apps/enable-device-flow.png
2 changes: 1 addition & 1 deletion components/DefaultLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ export const DefaultLayout = (props: Props) => {
style={{ height: '100vh' }}
>
<Header />
<main id="main-content">
<main id="main-content" style={{ scrollMarginTop: '5rem' }}>
<DeprecationBanner />
<RestBanner />

Expand Down
9 changes: 1 addition & 8 deletions components/GenericError.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,9 @@ import Link from 'next/link'
import { useRouter } from 'next/router'

import { MarkGithubIcon, CommentDiscussionIcon } from '@primer/octicons-react'
import { useVersion } from 'components/hooks/useVersion'
import { Lead } from 'components/ui/Lead'

export function GenericError() {
const { isEnterprise } = useVersion()

return (
<div className="min-h-screen d-flex flex-column">
<Head>
Expand All @@ -28,11 +25,7 @@ export function GenericError() {
</p>
<a
id="contact-us"
href={
isEnterprise
? 'https://enterprise.github.com/support'
: 'https://support.github.com/contact'
}
href="https://support.github.com/contact"
className="btn btn-outline mt-2"
>
<CommentDiscussionIcon size="small" className="octicon mr-1" />
Expand Down
4 changes: 4 additions & 0 deletions components/article/ClientSideHighlightJS.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,10 @@ export default function ClientSideHighlightJS() {
intersectionObserver.observe(element)
}
}

return () => {
intersectionObserver.disconnect()
}
}, [asPath])

return null
Expand Down
8 changes: 1 addition & 7 deletions components/page-footer/Support.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
import { PeopleIcon, CommentDiscussionIcon } from '@primer/octicons-react'

import { useTranslation } from 'components/hooks/useTranslation'
import { useVersion } from 'components/hooks/useVersion'
import { useMainContext } from 'components/context/MainContext'

export const Support = () => {
const { isEnterprise } = useVersion()
const { t } = useTranslation('support')
const { communityRedirect } = useMainContext()

Expand All @@ -25,11 +23,7 @@ export const Support = () => {
<div>
<a
id="contact-us"
href={
isEnterprise
? 'https://enterprise.github.com/support'
: 'https://support.github.com/contact'
}
href="https://support.github.com/contact"
className="Link—secondary text-bold"
>
<CommentDiscussionIcon size="small" className="octicon mr-1" />
Expand Down
2 changes: 2 additions & 0 deletions components/page-header/RestBanner.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ const restRepoDisplayPages = [
'branches',
'collaborators',
'commits',
'deploy_keys',
'deployments',
'pages',
'releases',
Expand All @@ -19,6 +20,7 @@ const restRepoCategoryExceptionsTitles = {
branches: 'Branches',
collaborators: 'Collaborators',
commits: 'Commits',
deploy_keys: 'Deploy Keys',
deployments: 'Deployments',
pages: 'GitHub Pages',
releases: 'Releases',
Expand Down
8 changes: 2 additions & 6 deletions components/rest/CodeBlock.module.scss
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
.codeBlock {
pre {
margin-bottom: 0;
border: 1px solid var(--color-border-default);
max-height: 32rem;
overflow: auto;
}
max-height: 32rem;
overflow: auto;
}
12 changes: 3 additions & 9 deletions components/rest/CodeBlock.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export function CodeBlock({ verb, headingLang, codeBlock, highlight }: Props) {
})

return (
<div className="code-extra">
<div className={headingLang && 'code-extra'}>
{headingLang && (
<header className="d-flex flex-justify-between flex-items-center p-2 text-small rounded-top-1 border">
{headingLang === 'JavaScript' ? (
Expand All @@ -41,16 +41,10 @@ export function CodeBlock({ verb, headingLang, codeBlock, highlight }: Props) {
</Tooltip>
</header>
)}
<pre
className={cx(
styles.methodCodeBlock,
'd-flex flex-justify-between flex-items-center rounded-1 border'
)}
data-highlight={highlight}
>
<pre className={cx(styles.codeBlock, 'rounded-1 border')} data-highlight={highlight}>
<code>
{verb && (
<span className="color-bg-accent-emphasis color-fg-on-emphasis rounded-1 text-uppercase">
<span className="color-bg-accent-emphasis color-fg-on-emphasis rounded-1 text-uppercase p-1">
{verb}
</span>
)}{' '}
Expand Down
1 change: 1 addition & 0 deletions components/rest/RestOperation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ export function RestOperation({ operation }: Props) {
{previews && (
<RestPreviewNotice slug={operation.slug} previews={operation['x-github'].previews} />
)}
<RestResponse responses={operation.responses} variant="error" />
</div>
)
}
1 change: 1 addition & 0 deletions components/rest/RestParameterTable.module.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
.parameterTable {
table-layout: fixed !important;
z-index: 0;

thead {
tr {
Expand Down
Loading

0 comments on commit 2f99d32

Please sign in to comment.