Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

repo sync #19319

Merged
merged 11 commits into from
Jul 26, 2022
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Empty file removed -
Empty file.
File renamed without changes.
1 change: 0 additions & 1 deletion .github/package.json

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/check-all-english-links.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ jobs:
# Don't care about CDN caching image URLs
DISABLE_REWRITE_ASSET_URLS: true
run: |
node server.mjs > /tmp/stdout.log 2> /tmp/stderr.log &
node server.js > /tmp/stdout.log 2> /tmp/stderr.log &
sleep 6
curl --retry-connrefused --retry 5 -I http://localhost:4000/

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/check-broken-links-github-github.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ jobs:
DISABLE_RENDERING_CACHE: true
run: |

node server.mjs &
node server.js &
sleep 5
curl --retry-connrefused --retry 3 -I http://localhost:4000/

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/code-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ on:
- '**.yaml'
- '**.yml'
- '**.scss'
- .eslintrc.js
- .eslintrc.cjs
# In case something like eslint or tsc or prettier upgrades
- 'package-lock.json'
# Ultimately, for debugging this workflow itself
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/dry-run-elasticsearch-indexing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
- gh-readonly-queue/main/**
pull_request:
paths:
- script/search/index-elasticsearch.mjs
- script/search/index-elasticsearch.js
- 'package*.json'
- .github/workflows/dry-run-elasticsearch-indexing.yml

Expand Down Expand Up @@ -63,7 +63,7 @@ jobs:
env:
ELASTICSEARCH_URL: 'http://localhost:9200'
run: |
./script/search/index-elasticsearch.mjs --verbose \
./script/search/index-elasticsearch.js --verbose \
-l en -l ja \
-V dotcom -V ghes-3.5

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/link-check-all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:
# Don't care about CDN caching image URLs
DISABLE_REWRITE_ASSET_URLS: true
run: |
./script/rendered-content-link-checker.mjs \
./script/rendered-content-link-checker.js \
--language en \
--max 100 \
--check-anchors \
Expand All @@ -66,7 +66,7 @@ jobs:
# Don't care about CDN caching image URLs
DISABLE_REWRITE_ASSET_URLS: true
run: |
./script/rendered-content-link-checker.mjs \
./script/rendered-content-link-checker.js \
--language en \
--exit \
--verbose \
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/orphaned-assets-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
run: |
set -e

./script/find-orphaned-assets.mjs | xargs git rm
./script/find-orphaned-assets.js | xargs git rm

# If nothing to commit, exit now. It's fine. No orphans.
git status | grep 'nothing to commit' && exit 0
Expand All @@ -58,6 +58,6 @@ jobs:

gh pr create \
--title "Delete orphaned assets ($date)" \
--body "Found with the find-orphaned-assets.mjs script" \
--body "Found with the find-orphaned-assets.js script" \
--repo github/docs-internal \
--label docs-content-fr
2 changes: 1 addition & 1 deletion .github/workflows/sync-search-elasticsearch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ jobs:

- name: Index into Elasticsearch
run: |
./script/search/index-elasticsearch.mjs \
./script/search/index-elasticsearch.js \
--language ${{ matrix.language }} \
--source-directory /tmp/records

Expand Down
8 changes: 4 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ ENV NODE_ENV production
# Whether to hide iframes, add warnings to external links
ENV AIRGAP false

# Preferred port for server.mjs
# Preferred port for server.js
ENV PORT 4000

ENV ENABLED_LANGUAGES "en"
Expand All @@ -94,12 +94,12 @@ COPY --chown=node:node middleware ./middleware
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
COPY --chown=node:node server.js ./server.js
COPY --chown=node:node start-server.js ./start-server.js

EXPOSE $PORT

CMD ["node", "server.mjs"]
CMD ["node", "server.js"]

# --------------------------------------------------------------------------------
# PRODUCTION IMAGE - includes all translations
Expand Down
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/discussions/edit-category-details.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.
7 changes: 2 additions & 5 deletions components/article/ArticlePage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,8 @@ const interactiveAlternatives: Record<string, { href: string }> = {
href: '/codespaces/setting-up-your-project-for-codespaces/setting-up-your-project-for-codespaces?langId=py',
},
}
type Props = {
children?: React.ReactNode
}

export const ArticlePage = ({ children }: Props) => {
export const ArticlePage = () => {
const { asPath } = useRouter()
const {
title,
Expand Down Expand Up @@ -145,7 +142,7 @@ export const ArticlePage = ({ children }: Props) => {
}
>
<div id="article-contents">
<MarkdownContent>{children || renderedPage}</MarkdownContent>
<MarkdownContent>{renderedPage}</MarkdownContent>
{effectiveDate && (
<div className="mt-4" id="effectiveDate">
Effective as of:{' '}
Expand Down
71 changes: 71 additions & 0 deletions components/article/AutomatedPage.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
import { useState, useEffect } from 'react'
import { useRouter } from 'next/router'
import dynamic from 'next/dynamic'

import { DefaultLayout } from 'components/DefaultLayout'
import { ArticleTitle } from 'components/article/ArticleTitle'
import { MarkdownContent } from 'components/ui/MarkdownContent'
import { Lead } from 'components/ui/Lead'
import { ArticleGridLayout } from './ArticleGridLayout'
import { MiniTocs } from 'components/ui/MiniTocs'
import { useAutomatedPageContext } from 'components/context/AutomatedPageContext'

const ClientSideHighlightJS = dynamic(() => import('./ClientSideHighlightJS'), { ssr: false })

type Props = {
children: React.ReactNode
}

export const AutomatedPage = ({ children }: Props) => {
const { asPath } = useRouter()
const { title, intro, renderedPage, miniTocItems } = useAutomatedPageContext()

// If the page contains `[data-highlight]` blocks, these pages need
// syntax highlighting. But not every page needs it, so it's conditionally
// lazy-loaded on the client.
const [lazyLoadHighlightJS, setLazyLoadHighlightJS] = useState(false)
useEffect(() => {
// It doesn't need to use querySelector because all we care about is if
// there is greater than zero of these in the DOM.
// Note! This "core selector", which determines whether to bother
// or not, needs to match what's used inside ClientSideHighlightJS.tsx
if (document.querySelector('[data-highlight]')) {
setLazyLoadHighlightJS(true)
}

// Important to depend on the current path because the first page you
// load, before any client-side navigation, might not need it, but the
// consecutive one does.
}, [asPath])

return (
<DefaultLayout>
{/* Doesn't matter *where* this is included because it will
never render anything. It always just return null. */}
{lazyLoadHighlightJS && <ClientSideHighlightJS />}

<div className="container-xl px-3 px-md-6 my-4">
<ArticleGridLayout
topper={<ArticleTitle>{title}</ArticleTitle>}
intro={
intro && (
<Lead data-testid="lead" data-search="lead">
{intro}
</Lead>
)
}
toc={
miniTocItems.length > 1 && <MiniTocs pageTitle={title} miniTocItems={miniTocItems} />
}
>
<div id="article-contents">
{renderedPage && (
<MarkdownContent className="pt-3 pb-4">{renderedPage}</MarkdownContent>
)}
{children && <MarkdownContent className="pt-3 pb-4">{children}</MarkdownContent>}
</div>
</ArticleGridLayout>
</div>
</DefaultLayout>
)
}
2 changes: 1 addition & 1 deletion components/lib/events.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ export function sendEvent({ type, version = '1.0.0', ...props }: SendEventProps)
}

const blob = new Blob([JSON.stringify(body)], { type: 'application/json' })
const endpoint = '/events'
const endpoint = '/api/events'
try {
// Only send the beacon if the feature is not disabled in the user's browser
// Even if the function exists, it can still throw an error from the call being blocked
Expand Down
22 changes: 9 additions & 13 deletions components/rest/RestReferencePage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -107,21 +107,17 @@ export const RestReferencePage = ({ restOperations }: StructuredContentT) => {
{intro}
</Lead>
)}
<MarkdownContent>
{renderedPage && <MarkdownContent className="pt-3 pb-4">{renderedPage}</MarkdownContent>}
{restOperations &&
restOperations.length > 0 &&
restOperations.map((operation, index) => (
<React.Fragment
{renderedPage && <MarkdownContent className="pt-3 pb-4">{renderedPage}</MarkdownContent>}
{restOperations.length > 0 && (
<MarkdownContent className="pt-3 pb-4">
{restOperations.map((operation) => (
<RestOperation
key={`${operation.title}-${operation.category}-${operation.subcategory}`}
>
<RestOperation
key={`restOperation-${operation.title}-${index}`}
operation={operation}
/>
</React.Fragment>
operation={operation}
/>
))}
</MarkdownContent>
</MarkdownContent>
)}
</div>
</DefaultLayout>
)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,22 +1,50 @@
---
title: Managing accessibility settings
intro: 'You can disable character key shortcuts on {% data variables.product.prodname_dotcom %} in your accessibility settings.'
shortTitle: Manage accessibility settings
intro: "{% data variables.product.product_name %}'s user interface can adapt to your vision, hearing, motor, cognitive, or learning needs."
versions:
feature: keyboard-shortcut-accessibility-setting
redirect_from:
- /account-and-profile/setting-up-and-managing-your-github-user-account/managing-user-account-settings/managing-accessibility-settings
type: how_to
miniTocMaxHeadingLevel: 3
---

## About accessibility settings

{% data variables.product.product_name %} includes a variety of keyboard shortcuts so that you can perform actions across the site without using your mouse to navigate. While shortcuts are useful to save time, they can sometimes make {% data variables.product.prodname_dotcom %} harder to use and less accessible.
To accommodate your vision, hearing, motor, cognitive, or learning needs, you can customize the user interface for {% data variables.product.product_location %}.

All keyboard shortcuts are enabled by default on {% data variables.product.product_name %}, but you can choose to disable character key shortcuts in your accessibility settings. This setting does not affect keyboard shortcuts provided by your web browser or {% data variables.product.prodname_dotcom %} shortcuts that use a modifier key such as <kbd>Control</kbd> or <kbd>Command</kbd>.
## Managing accessibility settings

## Managing character key shortcuts
You can decide whether you want to use some or all keyboard shortcuts on {% ifversion fpt or ghec %}{% data variables.product.product_location %}{% elsif ghes or ghae %}the website for {% data variables.product.product_location %}{% endif %}, and you can control the display of animated images.

### Managing keyboard shortcuts

You can perform actions across the {% data variables.product.product_name %} website without using your mouse by using your keyboard instead. Keyboard shortcuts can be useful to save time for some people, but may interfere with accessibility if you don't intend to use the shortcuts.

By default, all keyboard shortcuts are enabled on {% data variables.product.product_name %}. For more information, see "[Keyboard shortcuts](/get-started/using-github/keyboard-shortcuts)."

{% data reusables.user-settings.access_settings %}
{% data reusables.user-settings.accessibility_settings %}
1. Select or deselect the **Enable character key shortcuts** checkbox.
![Screenshot of the 'Enable character key shortcuts' checkbox](/assets/images/help/settings/disable-character-key-shortcuts.png)
2. Click **Save**.
1. Under "Keyboard shortcuts", manage settings for your keyboard shortcuts.

- Optionally, to disable or enable shortcut keys that don't use modifiers keys like <kbd>Control</kbd> or <kbd>Command</kbd>, under "General", deselect **Character keys**. If you disable character keys, you may still be able to trigger shortcuts for your web browser, and you can still trigger shortcuts for {% data variables.product.product_name %} that use a modifier key.
{%- ifversion command-palette %}
- Optionally, to customize the keyboard shortcuts for triggering the command palette, under "Command palette", use the drop-down menus to choose a keyboard shortcut. For more information, see "[{% data variables.product.company_short %} Command Palette](/get-started/using-github/github-command-palette)."
{%- endif %}

{% ifversion motion-management %}

### Managing motion

You can control how {% data variables.product.product_name %} displays animated images.

By default, {% data variables.product.product_name %} syncs with your system-level preference for reduced motion. For more information, see the documentation or settings for your operating system.

{% data reusables.user-settings.access_settings %}
{% data reusables.user-settings.accessibility_settings %}
1. Under "Motion", manage settings for motion.

- Optionally, to control how {% data variables.product.product_name %} displays animaged images, under "Autoplay animated images", select **Sync with system**, **Enabled**, or **Disabled**.

{% endif %}
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ on:
deployment_status
```

{% ifversion fpt or ghec %}
{% ifversion discussions %}
### `discussion`

| Webhook event payload | Activity types | `GITHUB_SHA` | `GITHUB_REF` |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ topics:
shortTitle: Server Statistics
---

{% data reusables.server-statistics.release-phase %}

## About {% data variables.product.prodname_server_statistics %}

{% data variables.product.prodname_server_statistics %} collects aggregate usage data from {% data variables.product.product_location %}, which you can use to better anticipate the needs of your organization, understand how your team works, and show the value you get from {% data variables.product.prodname_ghe_server %}.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -737,6 +737,20 @@ This utility rewrites the imported repository. This gives you a chance to rename
git-import-rewrite
```

{% ifversion ghes > 3.3 %}

## Security

### ghe-find-insecure-git-operations

This utility searches your instance's logs and identifies Git operations over SSH that use insecure algorithms or hash functions, including DSA, RSA-SHA-1, HMAC-SHA-1, and CBC ciphers. You can use the output to support each client's transition to a more secure SSH connection. For more information, see [{% data variables.product.prodname_blog %}](https://github.blog/2022-06-28-improving-git-protocol-security-on-github-enterprise-server){% ifversion ghes < 3.6 %}.{% elsif ghes > 3.5 %} and "[Configuring SSH connections to your instance](/admin/configuration/configuring-your-enterprise/configuring-ssh-connections-to-your-instance)."{% endif %}

```shell
ghe-find-insecure-git-operations
```

{% endif %}

## Support

### ghe-diagnostics
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,18 @@ settings to allow incoming emails](#configuring-dns-and-firewall-settings-to-all
![Save settings button](/assets/images/enterprise/management-console/save-settings.png)
{% data reusables.enterprise_site_admin_settings.wait-for-configuration-run %}

{% ifversion require-tls-for-smtp %}
## Enforcing TLS for SMTP connections

You can enforce TLS encryption for all incoming SMTP connections, which can help satisfy an ISO-27017 certification requirement.

{% data reusables.enterprise_site_admin_settings.email-settings %}
1. Under "Authentication," select **Enforce TLS auth (recommended)**.

![Screenshot of the "Enforce TLS auth (recommended)" checkbox](/assets/images/enterprise/configuration/enforce-tls-for-smtp-checkbox.png)
{% data reusables.enterprise_management_console.save-settings %}
{% endif %}

## Configuring DNS and firewall settings to allow incoming emails

If you want to allow email replies to notifications, you must configure your DNS settings.
Expand Down
Loading