diff --git a/components/Search.tsx b/components/Search.tsx index 662ff49e76..f567feee94 100644 --- a/components/Search.tsx +++ b/components/Search.tsx @@ -132,9 +132,9 @@ export function Search({ if (router.pathname === '/') { // Don't include router.locale so next doesn't attempt a // request to `/_next/static/chunks/pages/en.js` - router.replace(`/?${params.toString()}`, asPath) + router.replace(`/?${params.toString()}`, asPath, { shallow: true }) } else { - router.replace(asPath) + router.replace(asPath, undefined, { shallow: true }) } } }, [debouncedQuery]) diff --git a/lib/render-content/plugins/rewrite-local-links.js b/lib/render-content/plugins/rewrite-local-links.js index b3c9e9859c..b2b6fe2a5d 100644 --- a/lib/render-content/plugins/rewrite-local-links.js +++ b/lib/render-content/plugins/rewrite-local-links.js @@ -8,8 +8,8 @@ import nonEnterpriseDefaultVersion from '../../non-enterprise-default-version.js import { allVersions } from '../../all-versions.js' import removeFPTFromPath from '../../remove-fpt-from-path.js' import readJsonFile from '../../read-json-file.js' -const supportedVersions = Object.keys(allVersions) -const supportedPlans = Object.values(allVersions).map((v) => v.plan) + +const supportedPlans = new Set(Object.values(allVersions).map((v) => v.plan)) const externalRedirects = readJsonFile('./lib/redirects/external-sites.json') // Matches any tags with an href that starts with `/` @@ -36,18 +36,6 @@ export default function rewriteLocalLinks({ languageCode, version }) { } } -// The versions that some links might start with, which we need to know -// because if it's the case, we inject the language into the link as -// the first prefix. -// E.g. It can turn `/enterprise-cloud@latest/foo` -// into `/en/enterprise-cloud@latest/foo`. -// Using a Set to turn any lookups on this into a O(1) operation. -const allSupportedVersionsPrefixes = new Set([ - ...supportedPlans, - ...supportedVersions, - 'enterprise-server@latest', -]) - function getNewHref(node, languageCode, version) { const { href } = node.properties // Exceptions to link rewriting @@ -62,7 +50,7 @@ function getNewHref(node, languageCode, version) { // /enterprise-server/rest/reference/oauth-authorizations (this redirects to the latest version) // /enterprise-server@latest/rest/reference/oauth-authorizations (this redirects to the latest version) const firstLinkSegment = href.split('/')[1] - if (allSupportedVersionsPrefixes.has(firstLinkSegment)) { + if (supportedPlans.has(firstLinkSegment.split('@')[0])) { newHref = path.posix.join('/', languageCode, href) } diff --git a/tests/fixtures/page-with-deprecated-enterprise-links.md b/tests/fixtures/page-with-deprecated-enterprise-links.md new file mode 100644 index 0000000000..a2dc958c7d --- /dev/null +++ b/tests/fixtures/page-with-deprecated-enterprise-links.md @@ -0,0 +1,11 @@ +--- +title: Page with deprecated enterprise links +versions: + free-pro-team: '*' + enterprise-server: '*' +--- + + +- [Version 2.22](/enterprise-server@2.22) + +- [Version 3.2](/enterprise-server@3.2) diff --git a/tests/unit/page.js b/tests/unit/page.js index 8ee036dba4..5a397e4148 100644 --- a/tests/unit/page.js +++ b/tests/unit/page.js @@ -113,6 +113,32 @@ describe('Page class', () => { ).toBeGreaterThan(0) }) + // Much of this test is based on making sure we don't + // repeat the bug introduced in issue 1545. + test('rewrites links correctly for unsupported enterprise-server links', async () => { + const page = await Page.init({ + relativePath: 'page-with-deprecated-enterprise-links.md', + basePath: path.join(__dirname, '../fixtures'), + languageCode: 'en', + }) + const context = { + page: { version: `enterprise-server@${enterpriseServerReleases.latest}` }, + currentVersion: `enterprise-server@${enterpriseServerReleases.latest}`, + currentPath: '/en/page-with-deprecated-enterprise-links', + currentLanguage: 'en', + } + const rendered = await page.render(context) + // That page only contains exactly 2 links. And we can know + // exactly what we expect each one to be. + const $ = cheerio.load(rendered) + const first = $('a[href]').first() + expect(first.text()).toBe('Version 2.22') + expect(first.attr('href')).toBe('/en/enterprise-server@2.22') + const last = $('a[href]').last() + expect(last.text()).toBe('Version 3.2') + expect(last.attr('href')).toBe('/en/enterprise-server@3.2') + }) + test('rewrites links on prerendered GraphQL page include the current language prefix and version', async () => { const graphqlVersion = allVersions[`enterprise-server@${enterpriseServerReleases.latest}`].miscVersionName diff --git a/translations/pt-BR/content/actions/learn-github-actions/expressions.md b/translations/pt-BR/content/actions/learn-github-actions/expressions.md index ad2c38f04f..3fa5078735 100644 --- a/translations/pt-BR/content/actions/learn-github-actions/expressions.md +++ b/translations/pt-BR/content/actions/learn-github-actions/expressions.md @@ -50,12 +50,12 @@ env: Como parte da expressão, você pode usar os tipos de dados `boolean`, `null`, `number` ou `string`. -| Tipo de dados | Valor do literal | -| ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `boolean` | `true` ou `false` | -| `null` | `null` | -| `number` | Qualquer formato de número aceito por JSON. | -| `string` | Você não precisa anexar strings em {% raw %}${{{% endraw %} e {% raw %}}}{% endraw %}. However, if you do, you must use single quotes around the string and escape literal single quotes with an additional single quote. | +| Tipo de dados | Valor do literal | +| ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `boolean` | `true` ou `false` | +| `null` | `null` | +| `number` | Qualquer formato de número aceito por JSON. | +| `string` | You don't need to enclose strings in `{% raw %}${{{% endraw %}` and `{% raw %}}}{% endraw %}`. However, if you do, you must use single quotes (`'`) around the string. To use a literal single quote, escape the literal single quote using an additional single quote (`''`). Wrapping with double quotes (`"`) will throw an error. | #### Exemplo diff --git a/translations/pt-BR/content/actions/using-workflows/events-that-trigger-workflows.md b/translations/pt-BR/content/actions/using-workflows/events-that-trigger-workflows.md index cc041edef3..107c7b7fff 100644 --- a/translations/pt-BR/content/actions/using-workflows/events-that-trigger-workflows.md +++ b/translations/pt-BR/content/actions/using-workflows/events-that-trigger-workflows.md @@ -917,8 +917,6 @@ on: ```yaml on: push: - types: - - opened branches: - 'releases/**' paths: @@ -960,8 +958,6 @@ on: ```yaml on: push: - types: - - opened branches: - 'releases/**' paths: @@ -996,9 +992,9 @@ em: ### `versão` -| Carga de evento webhook | Tipos de atividade | `GITHUB_SHA` | `GITHUB_REF` | -| ----------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------- | ------------- | -| [`versão`](/developers/webhooks-and-events/webhooks/webhook-events-and-payloads/#release) | - `published`
- `unpublished`
- `created`
- `edited`
- `deleted`
- `prereleased`
- `released` | Último commit na versão com tag | Tag da versão | +| Carga de evento webhook | Tipos de atividade | `GITHUB_SHA` | `GITHUB_REF` | +| ----------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------- | ----------------------------------------------- | +| [`versão`](/developers/webhooks-and-events/webhooks/webhook-events-and-payloads/#release) | - `published`
- `unpublished`
- `created`
- `edited`
- `deleted`
- `prereleased`
- `released` | Último commit na versão com tag | Tag ref of release `refs/tags/` | {% note %} diff --git a/translations/pt-BR/content/actions/using-workflows/workflow-syntax-for-github-actions.md b/translations/pt-BR/content/actions/using-workflows/workflow-syntax-for-github-actions.md index d0a7d33cce..dcdea0f192 100644 --- a/translations/pt-BR/content/actions/using-workflows/workflow-syntax-for-github-actions.md +++ b/translations/pt-BR/content/actions/using-workflows/workflow-syntax-for-github-actions.md @@ -830,7 +830,7 @@ services: image: ghcr.io/owner/myservice1 credentials: username: ${{ github.actor }} - password: ${{ secrets.ghcr_token }} + password: ${{ secrets.github_token }} myservice2: image: dockerhub_org/myservice2 credentials: diff --git a/translations/pt-BR/content/admin/enterprise-management/configuring-clustering/differences-between-clustering-and-high-availability-ha.md b/translations/pt-BR/content/admin/enterprise-management/configuring-clustering/differences-between-clustering-and-high-availability-ha.md index eac0bd8371..94bba161d9 100644 --- a/translations/pt-BR/content/admin/enterprise-management/configuring-clustering/differences-between-clustering-and-high-availability-ha.md +++ b/translations/pt-BR/content/admin/enterprise-management/configuring-clustering/differences-between-clustering-and-high-availability-ha.md @@ -35,7 +35,7 @@ Tanto a alta disponibilidade (High Availability, HA) quanto o cluster fornecem r ## Backups e recuperação de desastre -Nem o clustering nem a HA devem ser considerados como substitutos para as medidas regulares de backup. Para obter mais informações, consulte "[Configurar backups no appliance](/enterprise/admin/guides/installation/configuring-backups-on-your-appliance)". +Neither HA nor Clustering should be considered a replacement for regular backups. Para obter mais informações, consulte "[Configurar backups no appliance](/enterprise/admin/guides/installation/configuring-backups-on-your-appliance)". ## Monitoramento diff --git a/translations/pt-BR/content/authentication/securing-your-account-with-two-factor-authentication-2fa/recovering-your-account-if-you-lose-your-2fa-credentials.md b/translations/pt-BR/content/authentication/securing-your-account-with-two-factor-authentication-2fa/recovering-your-account-if-you-lose-your-2fa-credentials.md index 9782828eb5..4fac2ddf2f 100644 --- a/translations/pt-BR/content/authentication/securing-your-account-with-two-factor-authentication-2fa/recovering-your-account-if-you-lose-your-2fa-credentials.md +++ b/translations/pt-BR/content/authentication/securing-your-account-with-two-factor-authentication-2fa/recovering-your-account-if-you-lose-your-2fa-credentials.md @@ -20,7 +20,10 @@ shortTitle: Recuperar uma conta com 2FA {% warning %} -**Aviso**: {% data reusables.two_fa.support-may-not-help %} +**Avisos**: + +- {% data reusables.two_fa.support-may-not-help %} +- {% data reusables.accounts.you-must-know-your-password %} {% endwarning %} @@ -28,12 +31,21 @@ shortTitle: Recuperar uma conta com 2FA ## Usar um código de recuperação da autenticação de dois fatores -Use um dos códigos de recuperação para obter acesso automaticamente à sua conta. Seus códigos de recuperação podem estar salvos em um gerenciador de senhas ou na pasta de downloads do seu computador. O nome padrão do arquivo de códigos de recuperação é `github-recovery-codes.txt`. Para obter mais informações sobre códigos de recuperação, consulte "[Configurar métodos de recuperação da autenticação de dois fatores](/articles/configuring-two-factor-authentication-recovery-methods#downloading-your-two-factor-authentication-recovery-codes)". +Use um dos códigos de recuperação para obter acesso automaticamente à sua conta. Seus códigos de recuperação podem estar salvos em um gerenciador de senhas ou na pasta de downloads do seu computador. O nome padrão do arquivo de códigos de recuperação é `github-recovery-codes.txt`. Para obter mais informações sobre códigos de recuperação, consulte "[Configurar métodos de recuperação da autenticação de dois fatores](/authentication/securing-your-account-with-two-factor-authentication-2fa/configuring-two-factor-authentication-recovery-methods#downloading-your-two-factor-authentication-recovery-codes)". -{% data reusables.two_fa.username-password %}{% ifversion fpt or ghec %} -2. Em "Encontrou algum problema?", clique em **Insira um código de recuperação de dois fatores**. ![Link to use a recovery code](/assets/images/help/2fa/2fa-recovery-code-link.png){% else %} -2. Na página da 2FA, em "Don't have your phone?" (Não está com seu telefone?), clique em **Enter a two-factor recovery code** (Digite um código de recuperação de dois fatores). ![Link to use a recovery code](/assets/images/help/2fa/2fa_recovery_dialog_box.png){% endif %} -3. Digite um dos seus códigos de recuperação e clique em **Verify** (Verificar). ![Campo para digitar um código de recuperação e botão Verify (Verificar)](/assets/images/help/2fa/2fa-type-verify-recovery-code.png) +{% data reusables.two_fa.username-password %} + +{% ifversion fpt or ghec %} +1. Under "Having problems?", click **Use a recovery code or request a reset**. + + ![Screenshot of link to use a recovery code](/assets/images/help/2fa/2fa-recovery-code-link.png) +{%- else %} +1. Na página da 2FA, em "Don't have your phone?" (Não está com seu telefone?), clique em **Enter a two-factor recovery code** (Digite um código de recuperação de dois fatores). + + ![Screenshot of link to use a recovery code](/assets/images/help/2fa/2fa_recovery_dialog_box.png){% endif %} +1. Digite um dos seus códigos de recuperação e clique em **Verify** (Verificar). + + ![Campo para digitar um código de recuperação e botão Verify (Verificar)](/assets/images/help/2fa/2fa-type-verify-recovery-code.png) {% ifversion fpt or ghec %} ## Autenticar com um número de telefone alternativo @@ -43,38 +55,52 @@ Se você perder o acesso ao seu aplicativo TOTP principal ou número de telefone ## Autenticar com uma chave de segurança -Se você configurou a autenticação de dois fatores com uma chave de segurança, você pode usar a chave de segurança como método de autenticação secundário para reaver automaticamente o acesso à sua conta. Para obter mais informações, consulte "[Configurar autenticação de dois fatores](/articles/configuring-two-factor-authentication#configuring-two-factor-authentication-using-a-security-key)". +Se você configurou a autenticação de dois fatores com uma chave de segurança, você pode usar a chave de segurança como método de autenticação secundário para reaver automaticamente o acesso à sua conta. Para obter mais informações, consulte "[Configurar autenticação de dois fatores](/authentication/securing-your-account-with-two-factor-authentication-2fa/configuring-two-factor-authentication#configuring-two-factor-authentication-using-a-security-key)". {% ifversion fpt or ghec %} ## Efetuar a autenticação com um dispositivo verificado, token SSH ou token de acesso pessoal -Se você sabe sua senha do {% data variables.product.product_name %} mas não tem credenciais de autenticação de dois fatores ou seus códigos de recuperação de autenticação de dois fatores, você pode ter uma senha única enviada para o seu endereço de e-mail verificado para começar o processo de verificação e recuperar o acesso à sua conta. +If you know your password for {% data variables.product.product_location %} but don't have the two-factor authentication credentials or your two-factor authentication recovery codes, you can have a one-time password sent to your verified email address to begin the verification process and regain access to your account. {% note %} -**Observação**: Por razões de segurança, recuperar o acesso à sua conta efetuando a autenticação com uma senha única pode levar de 3 a 5 dias úteis. Os pedidos adicionais enviados durante este período não serão revisados. +**Observação**: Por razões de segurança, recuperar o acesso à sua conta efetuando a autenticação com uma senha única pode levar de 1 a 3 dias úteis. {% data variables.product.company_short %} will not review additional requests submitted during this time. {% endnote %} Você pode usar as suas credenciais de autenticação de dois fatores ou os códigos de recuperação de dois fatores para recuperar o acesso à sua conta a qualquer momento no período de espera de 3 a 5 dias. -1. Digite seu nome de usuário e senha para solicitar autenticação. Se você não sabe sua senha de {% data variables.product.product_name %}, você não poderá gerar uma senha única. -2. Em "Encontrou algum problema?", clique em **Não consegue acessar seu dispositivo de dois fatores ou códigos de recuperação válidos?** ![Faça o link, se você não tiver seu dispositivo de 2FA ou códigos de recuperação](/assets/images/help/2fa/no-access-link.png) -3. Clique em **Eu entendo, começar** para solicitar uma redefinição das suas configurações de autenticação. ![Botão de redefinição da configuração de autenticação](/assets/images/help/2fa/reset-auth-settings.png) -4. Clique em **Enviar senha de uso único** para enviar uma senha de uso único para todos os endereços de e-mail associados à sua conta. ![Botão para enviar a senha de uso único](/assets/images/help/2fa/send-one-time-password.png) -5. Em "Única senha", digite a senha temporária do endereço e-mail de recuperação {% data variables.product.prodname_dotcom %} enviada. ![Campo para a senha de uso único](/assets/images/help/2fa/one-time-password-field.png) -6. Clique **Verificar endereço de e-mail**. -7. Escolha um fator de verificação alternativo. +1. Digite seu nome de usuário e senha para solicitar autenticação. + + {% warning %} + + **Aviso**: {% data reusables.accounts.you-must-know-your-password %} + + {% endwarning %} +1. Under "Having problems?", click **Use a recovery code or request a reset**. + + ![Screenshot of link if you don't have your 2fa device or recovery codes](/assets/images/help/2fa/no-access-link.png) +1. To the right of "Locked out?", click **Try recovering your account**. + + ![Screenshot of link to try recovering your account](/assets/images/help/2fa/try-recovering-your-account-link.png) +1. Clique em **Eu entendo, começar** para solicitar uma redefinição das suas configurações de autenticação. + + ![Screenshot of button to start reset of authentication settings](/assets/images/help/2fa/reset-auth-settings.png) +1. Click **Send one-time password** to send a one-time password to all eligible addresses associated with your account. Only verified emails are eligible for account recovery. If you've restricted password resets to your primary and/or backup addresses, these addresses are the only addresses eligible for account recovery. + + ![Screenshot of button to send one-time password](/assets/images/help/2fa/send-one-time-password.png) +1. Em "Única senha", digite a senha temporária do endereço e-mail de recuperação {% data variables.product.prodname_dotcom %} enviada. + + ![Screenshot of field to type one-time password](/assets/images/help/2fa/one-time-password-field.png) +1. Clique **Verificar endereço de e-mail**. + + ![Screenshot of button to verify email address](/assets/images/help/2fa/verify-email-address.png) +1. Escolha um fator de verificação alternativo. - Se você usou seu dispositivo atual para acessar essa conta antes e gostaria de usar o dispositivo para verificação, clique em **Verificar com este dispositivo**. - Se você já configurou uma chave SSH nesta conta e gostaria de usar a chave SSH para verificação, clique na **chave SSH**. - - Se você já configurou um token de acesso pessoal anteriormente e gostaria de usar o token de acesso pessoal para verificação, clique em **Token de acesso pessoal**. ![Botões de verificação alternativa](/assets/images/help/2fa/alt-verifications.png) -8. Um integrante do {% data variables.contact.github_support %} irá rever a sua solicitação e o seu endereço de e-mail de 3 a 5 dias úteis. Se a sua solicitação for aprovada, você receberá um link para concluir o processo de recuperação de conta. Se sua solicitação for negada, o e-mail incluirá uma forma de entrar em contato com o suporte para esclarecer outras dúvidas. + - Se você já configurou um token de acesso pessoal anteriormente e gostaria de usar o token de acesso pessoal para verificação, clique em **Token de acesso pessoal**. + + ![Screenshot of buttons for alternative verification](/assets/images/help/2fa/alt-verifications.png) +1. Um integrante do {% data variables.contact.github_support %} irá rever a sua solicitação e o seu endereço de e-mail de 1 a 3 dias úteis. Se a sua solicitação for aprovada, você receberá um link para concluir o processo de recuperação de conta. Se sua solicitação for negada, o e-mail incluirá uma forma de entrar em contato com o suporte para esclarecer outras dúvidas. {% endif %} - -## Leia mais - -- [Sobre a autenticação de dois fatores](/articles/about-two-factor-authentication)" -- "[Configurar a autenticação de dois fatores](/articles/configuring-two-factor-authentication)" -- "[Configurar métodos de recuperação de autenticação de dois fatores](/articles/configuring-two-factor-authentication-recovery-methods)" -- "[Acessar o {% data variables.product.prodname_dotcom %} usando a autenticação de dois fatores](/articles/accessing-github-using-two-factor-authentication)" diff --git a/translations/pt-BR/content/code-security/getting-started/github-security-features.md b/translations/pt-BR/content/code-security/getting-started/github-security-features.md index 5c2be0d2d9..450bb7ac3a 100644 --- a/translations/pt-BR/content/code-security/getting-started/github-security-features.md +++ b/translations/pt-BR/content/code-security/getting-started/github-security-features.md @@ -83,6 +83,12 @@ Detectar automaticamente tokens ou credenciais que foram verificados em um repos Mostre o impacto completo das alterações nas dependências e veja detalhes de qualquer versão vulnerável antes de fazer merge de um pull request. Para obter mais informações, consulte "[Sobre a revisão de dependências](/code-security/supply-chain-security/about-dependency-review)". {% endif %} +{% ifversion ghec or ghes > 3.1 %} +### Visão geral da segurança + +Review the security configuration and alerts for your organization and identify the repositories at greatest risk. Para obter mais informações, consulte "[Sobre a visão geral de segurança](/code-security/security-overview/about-the-security-overview)". +{% endif %} + ## Leia mais - "[Produtos do {% data variables.product.prodname_dotcom %}](/github/getting-started-with-github/githubs-products)" - "[Suporte à linguagem de {% data variables.product.prodname_dotcom %}](/github/getting-started-with-github/github-language-support)" diff --git a/translations/pt-BR/content/rest/reference/enterprise-admin.md b/translations/pt-BR/content/rest/reference/enterprise-admin.md index d903396303..006d78ee79 100644 --- a/translations/pt-BR/content/rest/reference/enterprise-admin.md +++ b/translations/pt-BR/content/rest/reference/enterprise-admin.md @@ -68,7 +68,7 @@ You can also read the current version by calling the [meta endpoint](/rest/refer {% endif %} -{% ifversion fpt or ghec or ghes > 3.2 %} +{% ifversion fpt or ghec or ghes > 3.2 or ghae-issue-5528 %} ## Audit log diff --git a/translations/pt-BR/content/rest/reference/permissions-required-for-github-apps.md b/translations/pt-BR/content/rest/reference/permissions-required-for-github-apps.md index 68849b2a03..dbd118c949 100644 --- a/translations/pt-BR/content/rest/reference/permissions-required-for-github-apps.md +++ b/translations/pt-BR/content/rest/reference/permissions-required-for-github-apps.md @@ -921,6 +921,9 @@ _Equipes_ {% ifversion fpt or ghes > 3.0 or ghae -%} - [`GET /repos/:owner/:repo/code-scanning/sarifs/:sarif_id`](/rest/reference/code-scanning#get-information-about-a-sarif-upload) (:read) {% endif -%} +{% ifversion fpt or ghec or ghes > 3.4 or ghae-issue-5435 -%} +- [`GET /orgs/:org/code-scanning/alerts`](/rest/reference/code-scanning#list-code-scanning-alerts-by-organization) (:read) +{% endif -%} {% ifversion fpt or ghes or ghec %} ### Permissão em "executores auto-hospedados" diff --git a/translations/pt-BR/data/reusables/accounts/you-must-know-your-password.md b/translations/pt-BR/data/reusables/accounts/you-must-know-your-password.md new file mode 100644 index 0000000000..f4795c3909 --- /dev/null +++ b/translations/pt-BR/data/reusables/accounts/you-must-know-your-password.md @@ -0,0 +1 @@ +If you protect your personal account with two-factor authentication but do not know your password, you will not be able to generate a one-time password to recover your account. {% data variables.product.company_short %} can send a password reset email to a verified address associated with your account. For more information, see "[Updating your {% data variables.product.prodname_dotcom %} access credentials](/authentication/keeping-your-account-and-data-secure/updating-your-github-access-credentials#requesting-a-new-password)." diff --git a/translations/pt-BR/data/reusables/actions/jobs/section-running-jobs-in-a-container-credentials.md b/translations/pt-BR/data/reusables/actions/jobs/section-running-jobs-in-a-container-credentials.md index d697ff8f8c..d645231024 100644 --- a/translations/pt-BR/data/reusables/actions/jobs/section-running-jobs-in-a-container-credentials.md +++ b/translations/pt-BR/data/reusables/actions/jobs/section-running-jobs-in-a-container-credentials.md @@ -8,6 +8,6 @@ container: image: ghcr.io/owner/image credentials: username: ${{ github.actor }} - password: ${{ secrets.ghcr_token }} + password: ${{ secrets.github_token }} ``` {% endraw %} diff --git a/translations/pt-BR/data/reusables/repositories/actions-scheduled-workflow-example.md b/translations/pt-BR/data/reusables/repositories/actions-scheduled-workflow-example.md index 050f0be94f..0f74abf51c 100644 --- a/translations/pt-BR/data/reusables/repositories/actions-scheduled-workflow-example.md +++ b/translations/pt-BR/data/reusables/repositories/actions-scheduled-workflow-example.md @@ -1,4 +1,4 @@ -É possível programar um fluxo de trabalho para ser executado em horários de UTC específicos usando a [sintaxe de cron POSIX](https://pubs.opengroup.org/onlinepubs/9699919799/utilities/crontab.html#tag_20_25_07). Fluxos de trabalho agendados executados no último commit no branch padrão ou branch de base. O intervalo mais curto que você pode executar fluxos de trabalho agendados é a cada 15 minutos. +É possível programar um fluxo de trabalho para ser executado em horários de UTC específicos usando a [sintaxe de cron POSIX](https://pubs.opengroup.org/onlinepubs/9699919799/utilities/crontab.html#tag_20_25_07). Fluxos de trabalho agendados executados no último commit no branch padrão ou branch de base. O intervalo mais curto que você pode executar fluxos de trabalho agendados é a cada 5 minutos. Este exemplo aciona o fluxo de trabalho todos os dias às 17:30 e 17:30 UTC: diff --git a/translations/zh-CN/content/actions/learn-github-actions/expressions.md b/translations/zh-CN/content/actions/learn-github-actions/expressions.md index 0dc15fcbc3..88e983d799 100644 --- a/translations/zh-CN/content/actions/learn-github-actions/expressions.md +++ b/translations/zh-CN/content/actions/learn-github-actions/expressions.md @@ -50,12 +50,12 @@ env: 作为表达式的一部分,您可以使用 `boolean`、`null`、`number` 或 `string` 数据类型。 -| 数据类型 | 文字值 | -| -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `布尔值` | `true` 或 `false` | -| `null` | `null` | -| `number` | JSON 支持的任何数字格式。 | -| `字符串` | You don't need to enclose strings in {% raw %}${{{% endraw %} and {% raw %}}}{% endraw %}. However, if you do, you must use single quotes around the string and escape literal single quotes with an additional single quote. | +| 数据类型 | 文字值 | +| -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `布尔值` | `true` 或 `false` | +| `null` | `null` | +| `number` | JSON 支持的任何数字格式。 | +| `字符串` | You don't need to enclose strings in `{% raw %}${{{% endraw %}` and `{% raw %}}}{% endraw %}`. However, if you do, you must use single quotes (`'`) around the string. To use a literal single quote, escape the literal single quote using an additional single quote (`''`). Wrapping with double quotes (`"`) will throw an error. | #### 示例 diff --git a/translations/zh-CN/content/actions/using-workflows/events-that-trigger-workflows.md b/translations/zh-CN/content/actions/using-workflows/events-that-trigger-workflows.md index 19f48598a8..bfa0d4d362 100644 --- a/translations/zh-CN/content/actions/using-workflows/events-that-trigger-workflows.md +++ b/translations/zh-CN/content/actions/using-workflows/events-that-trigger-workflows.md @@ -917,8 +917,6 @@ on: ```yaml on: push: - types: - - opened branches: - 'releases/**' paths: @@ -960,8 +958,6 @@ on: ```yaml on: push: - types: - - opened branches: - 'releases/**' paths: @@ -996,9 +992,9 @@ on: ### `发行版` -| Web 挂钩事件有效负载 | 活动类型 | `GITHUB_SHA` | `GITHUB_REF` | -| -------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------ | ------------ | -| [`发行版`](/developers/webhooks-and-events/webhooks/webhook-events-and-payloads/#release) | - `published`
- `unpublished`
- `created`
- `edited`
- `deleted`
- `prereleased`
- `released` | 标记的发行版中的最新提交 | 发行版标记 | +| Web 挂钩事件有效负载 | 活动类型 | `GITHUB_SHA` | `GITHUB_REF` | +| -------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------ | ----------------------------------------------- | +| [`发行版`](/developers/webhooks-and-events/webhooks/webhook-events-and-payloads/#release) | - `published`
- `unpublished`
- `created`
- `edited`
- `deleted`
- `prereleased`
- `released` | 标记的发行版中的最新提交 | Tag ref of release `refs/tags/` | {% note %} diff --git a/translations/zh-CN/content/actions/using-workflows/workflow-syntax-for-github-actions.md b/translations/zh-CN/content/actions/using-workflows/workflow-syntax-for-github-actions.md index 02d9f85a3b..cb5565b451 100644 --- a/translations/zh-CN/content/actions/using-workflows/workflow-syntax-for-github-actions.md +++ b/translations/zh-CN/content/actions/using-workflows/workflow-syntax-for-github-actions.md @@ -830,7 +830,7 @@ services: image: ghcr.io/owner/myservice1 credentials: username: ${{ github.actor }} - password: ${{ secrets.ghcr_token }} + password: ${{ secrets.github_token }} myservice2: image: dockerhub_org/myservice2 credentials: diff --git a/translations/zh-CN/content/admin/enterprise-management/configuring-clustering/differences-between-clustering-and-high-availability-ha.md b/translations/zh-CN/content/admin/enterprise-management/configuring-clustering/differences-between-clustering-and-high-availability-ha.md index f3f5dfa2f7..46445e5ec1 100644 --- a/translations/zh-CN/content/admin/enterprise-management/configuring-clustering/differences-between-clustering-and-high-availability-ha.md +++ b/translations/zh-CN/content/admin/enterprise-management/configuring-clustering/differences-between-clustering-and-high-availability-ha.md @@ -35,7 +35,7 @@ shortTitle: 选择集群或 HA ## 备份和灾难恢复 -HA 或集群都不应被视为常规备份的替代品。 更多信息请参阅“[在设备上配置备份](/enterprise/admin/guides/installation/configuring-backups-on-your-appliance)”。 +Neither HA nor Clustering should be considered a replacement for regular backups. 更多信息请参阅“[在设备上配置备份](/enterprise/admin/guides/installation/configuring-backups-on-your-appliance)”。 ## 监视 diff --git a/translations/zh-CN/content/authentication/securing-your-account-with-two-factor-authentication-2fa/recovering-your-account-if-you-lose-your-2fa-credentials.md b/translations/zh-CN/content/authentication/securing-your-account-with-two-factor-authentication-2fa/recovering-your-account-if-you-lose-your-2fa-credentials.md index 78721b16ce..4977a6020b 100644 --- a/translations/zh-CN/content/authentication/securing-your-account-with-two-factor-authentication-2fa/recovering-your-account-if-you-lose-your-2fa-credentials.md +++ b/translations/zh-CN/content/authentication/securing-your-account-with-two-factor-authentication-2fa/recovering-your-account-if-you-lose-your-2fa-credentials.md @@ -20,7 +20,10 @@ shortTitle: 使用 2FA 找回帐户 {% warning %} -**警告**:{% data reusables.two_fa.support-may-not-help %} +**警告**: + +- {% data reusables.two_fa.support-may-not-help %} +- {% data reusables.accounts.you-must-know-your-password %} {% endwarning %} @@ -28,12 +31,21 @@ shortTitle: 使用 2FA 找回帐户 ## 使用双因素身份验证恢复代码 -使用您的恢复代码之一自动重新进入您的帐户。 您可能已将恢复代码保存到密码管理器或计算机的下载文件夹中。 恢复代码的默认文件名为 `github-recovery-codes.txt`。 有关恢复代码的更多信息,请参阅“[配置双因素身份验证恢复方法](/articles/configuring-two-factor-authentication-recovery-methods#downloading-your-two-factor-authentication-recovery-codes)”。 +使用您的恢复代码之一自动重新进入您的帐户。 您可能已将恢复代码保存到密码管理器或计算机的下载文件夹中。 恢复代码的默认文件名为 `github-recovery-codes.txt`。 有关恢复代码的更多信息,请参阅“[配置双因素身份验证恢复方法](/authentication/securing-your-account-with-two-factor-authentication-2fa/configuring-two-factor-authentication-recovery-methods#downloading-your-two-factor-authentication-recovery-codes)”。 -{% data reusables.two_fa.username-password %}{% ifversion fpt or ghec %} -2. 在“Having Problems?(有问题?)”下,单击 **Enter a two-factor recovery code(输入双重恢复代码)**。 ![Link to use a recovery code](/assets/images/help/2fa/2fa-recovery-code-link.png){% else %} -2. 在 2FA 页面上的“Don't have your phone?(没有您的电话?)”下,单击 **Enter a two-factor recovery code(输入双因素恢复代码)**。 ![Link to use a recovery code](/assets/images/help/2fa/2fa_recovery_dialog_box.png){% endif %} -3. 输入恢复代码之一,然后单击 **Verify(验证)**。 ![输入恢复代码的字段和验证按钮](/assets/images/help/2fa/2fa-type-verify-recovery-code.png) +{% data reusables.two_fa.username-password %} + +{% ifversion fpt or ghec %} +1. Under "Having problems?", click **Use a recovery code or request a reset**. + + ![Screenshot of link to use a recovery code](/assets/images/help/2fa/2fa-recovery-code-link.png) +{%- else %} +1. 在 2FA 页面上的“Don't have your phone?(没有您的电话?)”下,单击 **Enter a two-factor recovery code(输入双因素恢复代码)**。 + + ![Screenshot of link to use a recovery code](/assets/images/help/2fa/2fa_recovery_dialog_box.png){% endif %} +1. 输入恢复代码之一,然后单击 **Verify(验证)**。 + + ![输入恢复代码的字段和验证按钮](/assets/images/help/2fa/2fa-type-verify-recovery-code.png) {% ifversion fpt or ghec %} ## 使用后备号码进行身份验证 @@ -43,38 +55,52 @@ shortTitle: 使用 2FA 找回帐户 ## 使用安全密钥进行身份验证 -如果您使用安全密钥配置双重身份验证,则可以使用安全密钥作为辅助身份验证方法来自动重新获得对帐户的访问权限。 更多信息请参阅“[配置双重身份验证](/articles/configuring-two-factor-authentication#configuring-two-factor-authentication-using-a-security-key)”。 +如果您使用安全密钥配置双重身份验证,则可以使用安全密钥作为辅助身份验证方法来自动重新获得对帐户的访问权限。 更多信息请参阅“[配置双重身份验证](/authentication/securing-your-account-with-two-factor-authentication-2fa/configuring-two-factor-authentication#configuring-two-factor-authentication-using-a-security-key)”。 {% ifversion fpt or ghec %} ## 使用经过验证的设备、SSH 令牌或个人访问令牌进行身份验证 -如果您知道 {% data variables.product.product_name %} 密码但无法访问双重身份验证凭据,或没有双重身份验证恢复代码,则可以将一次性密码发送到经验证的电子邮件地址,以开始验证过程,重新获得对帐户的访问权限。 +If you know your password for {% data variables.product.product_location %} but don't have the two-factor authentication credentials or your two-factor authentication recovery codes, you can have a one-time password sent to your verified email address to begin the verification process and regain access to your account. {% note %} -**注**:出于安全原因,使用一次性密码验证来重新获得帐户访问权限可能需要 3-5 个工作日。 在此期间提交的其他请求将不予审查。 +**注**:出于安全原因,使用一次性密码验证来重新获得帐户访问权限可能需要 1-3 个工作日。 {% data variables.product.company_short %} will not review additional requests submitted during this time. {% endnote %} 在这 3-5 天的等待期内,您随时可以使用双重身份验证凭据或双重身份验证恢复代码重新获得对帐户的访问权限。 -1. 输入您的用户名和密码以提示身份验证。 如果您不知道 {% data variables.product.product_name %} 密码,将无法生成一次性密码。 -2. 在“Having Problems?(有问题?)”下,单击 **Can't access your two factor device or valid recovery codes?(无法访问双重设备或有效的恢复代码?)**。 ![没有 2fa 设备或恢复码时的链接](/assets/images/help/2fa/no-access-link.png) -3. 单击 **I understand, get started(我理解,开始)**请求重置身份验证设置。 ![重置身份验证设置按钮](/assets/images/help/2fa/reset-auth-settings.png) -4. 单击 **Send one-time password(发送一次性密码)**向与您的帐户关联的所有电子邮件地址发送一次性密码。 ![发送一次性密码按钮](/assets/images/help/2fa/send-one-time-password.png) -5. Under "One-time password", type the temporary password from the recovery email {% data variables.product.prodname_dotcom %} sent. ![一次性密码字段](/assets/images/help/2fa/one-time-password-field.png) -6. 单击 **Verify email address(验证电子邮件地址)**。 -7. 选择替代验证因素。 +1. 输入您的用户名和密码以提示身份验证。 + + {% warning %} + + **Warning**: {% data reusables.accounts.you-must-know-your-password %} + + {% endwarning %} +1. Under "Having problems?", click **Use a recovery code or request a reset**. + + ![Screenshot of link if you don't have your 2fa device or recovery codes](/assets/images/help/2fa/no-access-link.png) +1. To the right of "Locked out?", click **Try recovering your account**. + + ![Screenshot of link to try recovering your account](/assets/images/help/2fa/try-recovering-your-account-link.png) +1. 单击 **I understand, get started(我理解,开始)**请求重置身份验证设置。 + + ![Screenshot of button to start reset of authentication settings](/assets/images/help/2fa/reset-auth-settings.png) +1. Click **Send one-time password** to send a one-time password to all eligible addresses associated with your account. Only verified emails are eligible for account recovery. If you've restricted password resets to your primary and/or backup addresses, these addresses are the only addresses eligible for account recovery. + + ![Screenshot of button to send one-time password](/assets/images/help/2fa/send-one-time-password.png) +1. Under "One-time password", type the temporary password from the recovery email {% data variables.product.prodname_dotcom %} sent. + + ![Screenshot of field to type one-time password](/assets/images/help/2fa/one-time-password-field.png) +1. 单击 **Verify email address(验证电子邮件地址)**。 + + ![Screenshot of button to verify email address](/assets/images/help/2fa/verify-email-address.png) +1. 选择替代验证因素。 - 如果您之前已经使用当前设备登录此帐户,并且想使用该设备进行验证,请单击 **Verify with this device(使用此设备进行验证)**。 - 如果您之前已在此帐户上设置 SSH 密钥,并且想使用此 SSH 密钥进行验证,请单击 **SSH key(SSH 密钥)**。 - - 如果您之前已经设置个人访问令牌,并且想使用个人访问令牌进行验证,请单击 **Personal access token(个人访问令牌)**。 ![替代验证按钮](/assets/images/help/2fa/alt-verifications.png) -8. {% data variables.contact.github_support %} 的成员将在 3-5 个工作日内审查您的请求并给您发送电子邮件。 如果您的请求获得批准,您将收到一个完成帐户恢复过程的链接。 如果您的请求被拒绝,电子邮件将说明就任何其他问题联系支持的方式。 + - 如果您之前已经设置个人访问令牌,并且想使用个人访问令牌进行验证,请单击 **Personal access token(个人访问令牌)**。 + + ![Screenshot of buttons for alternative verification](/assets/images/help/2fa/alt-verifications.png) +1. {% data variables.contact.github_support %} 的成员将在 1-3 个工作日内审查您的请求并给您发送电子邮件。 如果您的请求获得批准,您将收到一个完成帐户恢复过程的链接。 如果您的请求被拒绝,电子邮件将说明就任何其他问题联系支持的方式。 {% endif %} - -## 延伸阅读 - -- "[关于双重身份验证](/articles/about-two-factor-authentication)" -- "[配置双重身份验证](/articles/configuring-two-factor-authentication)" -- "[配置双重身份验证恢复方法](/articles/configuring-two-factor-authentication-recovery-methods)" -- “[使用双重身份验证访问 {% data variables.product.prodname_dotcom %}](/articles/accessing-github-using-two-factor-authentication)”。 diff --git a/translations/zh-CN/content/code-security/getting-started/github-security-features.md b/translations/zh-CN/content/code-security/getting-started/github-security-features.md index f9afc594a9..dd984cf9de 100644 --- a/translations/zh-CN/content/code-security/getting-started/github-security-features.md +++ b/translations/zh-CN/content/code-security/getting-started/github-security-features.md @@ -83,6 +83,12 @@ Automatically detect tokens or credentials that have been checked into a reposit 在合并拉取请求之前显示依赖项更改的全部影响以及任何有漏洞版本的详情。 更多信息请参阅“[关于依赖项审查](/code-security/supply-chain-security/about-dependency-review)”。 {% endif %} +{% ifversion ghec or ghes > 3.1 %} +### 安全概述 + +Review the security configuration and alerts for your organization and identify the repositories at greatest risk. For more information, see "[About the security overview](/code-security/security-overview/about-the-security-overview)." +{% endif %} + ## 延伸阅读 - “[{% data variables.product.prodname_dotcom %} 的产品](/github/getting-started-with-github/githubs-products)” - "[{% data variables.product.prodname_dotcom %} 语言支持](/github/getting-started-with-github/github-language-support)" diff --git a/translations/zh-CN/content/rest/reference/enterprise-admin.md b/translations/zh-CN/content/rest/reference/enterprise-admin.md index d903396303..006d78ee79 100644 --- a/translations/zh-CN/content/rest/reference/enterprise-admin.md +++ b/translations/zh-CN/content/rest/reference/enterprise-admin.md @@ -68,7 +68,7 @@ You can also read the current version by calling the [meta endpoint](/rest/refer {% endif %} -{% ifversion fpt or ghec or ghes > 3.2 %} +{% ifversion fpt or ghec or ghes > 3.2 or ghae-issue-5528 %} ## Audit log diff --git a/translations/zh-CN/content/rest/reference/permissions-required-for-github-apps.md b/translations/zh-CN/content/rest/reference/permissions-required-for-github-apps.md index 52f78a4d1a..b7132b223d 100644 --- a/translations/zh-CN/content/rest/reference/permissions-required-for-github-apps.md +++ b/translations/zh-CN/content/rest/reference/permissions-required-for-github-apps.md @@ -921,6 +921,9 @@ _团队_ {% ifversion fpt or ghes > 3.0 or ghae -%} - [`GET /repos/:owner/:repo/code-scanning/sarifs/:sarif_id`](/rest/reference/code-scanning#get-information-about-a-sarif-upload) (:read) {% endif -%} +{% ifversion fpt or ghec or ghes > 3.4 or ghae-issue-5435 -%} +- [`GET /orgs/:org/code-scanning/alerts`](/rest/reference/code-scanning#list-code-scanning-alerts-by-organization) (:read) +{% endif -%} {% ifversion fpt or ghes or ghec %} ### 有关“自托管运行器”的权限 diff --git a/translations/zh-CN/data/reusables/accounts/you-must-know-your-password.md b/translations/zh-CN/data/reusables/accounts/you-must-know-your-password.md new file mode 100644 index 0000000000..f4795c3909 --- /dev/null +++ b/translations/zh-CN/data/reusables/accounts/you-must-know-your-password.md @@ -0,0 +1 @@ +If you protect your personal account with two-factor authentication but do not know your password, you will not be able to generate a one-time password to recover your account. {% data variables.product.company_short %} can send a password reset email to a verified address associated with your account. For more information, see "[Updating your {% data variables.product.prodname_dotcom %} access credentials](/authentication/keeping-your-account-and-data-secure/updating-your-github-access-credentials#requesting-a-new-password)." diff --git a/translations/zh-CN/data/reusables/actions/jobs/section-running-jobs-in-a-container-credentials.md b/translations/zh-CN/data/reusables/actions/jobs/section-running-jobs-in-a-container-credentials.md index d697ff8f8c..d645231024 100644 --- a/translations/zh-CN/data/reusables/actions/jobs/section-running-jobs-in-a-container-credentials.md +++ b/translations/zh-CN/data/reusables/actions/jobs/section-running-jobs-in-a-container-credentials.md @@ -8,6 +8,6 @@ container: image: ghcr.io/owner/image credentials: username: ${{ github.actor }} - password: ${{ secrets.ghcr_token }} + password: ${{ secrets.github_token }} ``` {% endraw %} diff --git a/translations/zh-CN/data/reusables/repositories/actions-scheduled-workflow-example.md b/translations/zh-CN/data/reusables/repositories/actions-scheduled-workflow-example.md index 6d51ab4287..ba514ece6b 100644 --- a/translations/zh-CN/data/reusables/repositories/actions-scheduled-workflow-example.md +++ b/translations/zh-CN/data/reusables/repositories/actions-scheduled-workflow-example.md @@ -1,4 +1,4 @@ -您可以使用 [POSIX cron 语法](https://pubs.opengroup.org/onlinepubs/9699919799/utilities/crontab.html#tag_20_25_07)安排工作流程在特定的 UTC 时间运行。 预定的工作流程在默认或基础分支的最新提交上运行。 您可以运行预定工作流程的最短间隔是每 15 分钟一次。 +您可以使用 [POSIX cron 语法](https://pubs.opengroup.org/onlinepubs/9699919799/utilities/crontab.html#tag_20_25_07)安排工作流程在特定的 UTC 时间运行。 预定的工作流程在默认或基础分支的最新提交上运行。 您可以运行预定工作流程的最短间隔是每 5 分钟一次。 此示例在每天 5:30 和 17:30 UTC 触发工作流程: