Skip to content

Commit b8f73fb

Browse files
authored
Merge pull request github#20439 from github/repo-sync
repo sync
2 parents bbc4818 + 785607f commit b8f73fb

File tree

55 files changed

+375
-268
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+375
-268
lines changed

components/context/PlaygroundContext.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,9 @@ export const PlaygroundContextProvider = (props: { children: React.ReactNode })
5959
const router = useRouter()
6060
const [activeSectionIndex, setActiveSectionIndex] = useState(0)
6161
const [scrollToSection, setScrollToSection] = useState<number>()
62-
const path = router.asPath.split('?')[0].split('#')[0]
63-
62+
const path = router.asPath.includes('@latest')
63+
? router.asPath.split('?')[0].split('#')[0].split('@latest')[1]
64+
: router.asPath.split('?')[0].split('#')[0]
6465
const relevantArticles = articles.filter(({ slug }) => slug === path)
6566

6667
const { langId } = router.query

components/lib/get-rest-code-samples.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,14 @@ export function getShellExample(operation: Operation, codeSample: CodeSample) {
4343
}
4444
}
4545

46+
let authHeader = '-H "Authorization: Bearer <YOUR-TOKEN>"'
47+
if (operation.subcategory === 'management-console') {
48+
authHeader = '-u "api_key:your-password"'
49+
}
50+
4651
const args = [
4752
operation.verb !== 'get' && `-X ${operation.verb.toUpperCase()}`,
48-
`-H "Accept: ${defaultAcceptHeader}" \\ \n -H "Authorization: Bearer <YOUR-TOKEN>"`,
53+
`-H "Accept: ${defaultAcceptHeader}" \\ \n ${authHeader}`,
4954
`${operation.serverUrl}${requestPath}`,
5055
requestBodyParams,
5156
].filter(Boolean)

components/playground/CodeLanguagePicker.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export const CodeLanguagePicker = () => {
1515
<SubNav.Link
1616
key={language.id}
1717
as={Link}
18-
href={`${routePath}?langId=${language.id}`}
18+
href={`/${router.locale}${routePath}?langId=${language.id}`}
1919
selected={language.id === currentLanguage.id}
2020
>
2121
{language.label}

components/rest/RestCodeSamples.tsx

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -60,14 +60,17 @@ export function RestCodeSamples({ operation, slug }: Props) {
6060
}))
6161

6262
// Menu options for the language selector
63-
const languageSelectOptions: LanguageOptionT[] = [
64-
{ key: CURLKEY, text: 'cURL' },
65-
{ key: JSKEY, text: 'JavaScript' },
66-
]
67-
// Not all examples support the GH CLI language option. If any of
68-
// the examples don't support it, we don't show GH CLI as an option.
69-
if (!languageExamples.some((example) => example.ghcli === undefined)) {
70-
languageSelectOptions.push({ key: GHCLIKEY, text: 'GitHub CLI' })
63+
const languageSelectOptions: LanguageOptionT[] = [{ key: CURLKEY, text: 'cURL' }]
64+
65+
// Management Console operations are not supported by Octokit
66+
if (operation.subcategory !== 'management-console') {
67+
languageSelectOptions.push({ key: JSKEY, text: 'JavaScript' })
68+
69+
// Not all examples support the GH CLI language option. If any of
70+
// the examples don't support it, we don't show GH CLI as an option.
71+
if (!languageExamples.some((example) => example.ghcli === undefined)) {
72+
languageSelectOptions.push({ key: GHCLIKEY, text: 'GitHub CLI' })
73+
}
7174
}
7275

7376
// Menu options for the example selector

translations/pt-BR/content/actions/learn-github-actions/contexts.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -405,11 +405,11 @@ Este exemplo do contexto `trabalhos` contém o resultado e as saídas de um trab
405405

406406
```json
407407
{
408-
example_job: {
409-
result: success,
410-
outputs: {
411-
output1: hello,
412-
output2: world
408+
"example_job": {
409+
"result": "success",
410+
"outputs": {
411+
"output1": "hello",
412+
"output2": "world"
413413
}
414414
}
415415
}
@@ -468,7 +468,7 @@ O contexto `etapas` contém informações sobre as etapas do trabalho atual que
468468

469469
Este exemplo `passo` contexto mostra duas etapas anteriores que tinham um [`id`](/actions/learn-github-actions/workflow-syntax-for-github-actions#jobsjob_idstepsid) especificado. O `id` da primeira etapa era denominado `checkout` e o segundo, `generate_number`. A etapa `generate_number` tinha uma saída denominada `random_number`.
470470

471-
```yaml
471+
```json
472472
{
473473
"checkout": {
474474
"outputs": {},
@@ -529,7 +529,7 @@ A propriedade `runner.workspace` não é documentada propositalmente. É uma pro
529529

530530
O contexto de exemplo a seguir é de um executor do Linux hospedado em {% data variables.product.prodname_dotcom %}.
531531

532-
```yaml
532+
```json
533533
{
534534
"os": "Linux",
535535
"arch": "X64",
@@ -586,7 +586,7 @@ O contexto `segredos` contém os nomes e valores de segredos disponíveis para a
586586

587587
O conteúdo de exemplo do contexto dos `segredos` mostra o `GITHUB_TOKEN` automático, assim como outros dois segredos disponíveis para a execução do fluxo de trabalho.
588588

589-
```yaml
589+
```json
590590
{
591591
"github_token": "***",
592592
"NPM_TOKEN": "***",
@@ -614,7 +614,7 @@ Para fluxos de trabalho com uma matriz, o contexto `estratégia` contém informa
614614

615615
O conteúdo de exemplo a seguir do contexto `estratégia` é de uma matriz com quatro trabalhos, e é tirada do trabalho final. Observe a diferença entre o número de `job-index` baseado em zero e o total de `job-job` que não é baseado em zero.
616616

617-
```yaml
617+
```json
618618
{
619619
"fail-fast": true,
620620
"job-index": 3,
@@ -663,7 +663,7 @@ Não há propriedades padrão no contexto `matriz`, apenas as que são definidas
663663

664664
O exemplo a seguir do contexto `matriz` é de um trabalho em uma matriz que tem as propriedades de matriz `os` e `` definidas no fluxo de trabalho. O trabalho está executando a combinação matriz de um `ubuntu-latest` OS e do Node.js versão `16`.
665665

666-
```yaml
666+
```json
667667
{
668668
"os": "ubuntu-latest",
669669
"node": 16
@@ -712,7 +712,7 @@ O contexto `needs` contém saídas de todos os trabalhos definidos como uma depe
712712

713713
O conteúdo de exemplo a seguir do contexto `needs` mostra informações para dois trabalhos dos quais o trabalho atual depende.
714714

715-
```yaml
715+
```json
716716
{
717717
"build": {
718718
"result": "success",
@@ -783,7 +783,7 @@ O exemplo a seguir do contexto `entradas` é de um fluxo de trabalho que definiu
783783

784784

785785

786-
```yaml
786+
```json
787787
{
788788
"build_id": 123456768,
789789
"deploy_target": "deployment_sys_1a",

translations/pt-BR/content/actions/learn-github-actions/understanding-github-actions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ Para obter mais informações, consulte "[Criar ações](/actions/creating-actio
8383

8484
### Executores
8585

86-
{% data reusables.actions.about-runners %} Cada executor pode executar uma tarefa por vez. {% ifversion ghes or ghae %} Você deve hospedar seus próprios executores para {% data variables.product.product_name %}. {% elsif fpt or ghec %}{% data variables.product.company_short %} fornece executores para Ubuntu Linux, Microsoft Windows e macOS para executar seus fluxos de trabalho. Cada fluxo de trabalho é executado em uma nova máquina virtual provisionada. {% ifversion actions-hosted-runners %} {% data variables.product.prodname_dotcom %} também oferece {% data variables.actions.hosted_runner %}s, que estão disponíveis em configurações mais amplas. For more information, see "[Using {% data variables.actions.hosted_runner %}s](/actions/using-github-hosted-runners/using-larger-runners)." {% endif %}Se você precisar de um sistema operacional diferente ou precisar de uma configuração de hardware específica, você poderá hospedar seus próprios executores.{% endif %} Para mais informações{% ifversion fpt or ghec %} sobre executores auto-hospedados{% endif %}, consulte "[Hospedando os seus próprios executores](/actions/hosting-your-own-runners)"
86+
{% data reusables.actions.about-runners %} Cada executor pode executar uma tarefa por vez. {% ifversion ghes or ghae %} Você deve hospedar seus próprios executores para {% data variables.product.product_name %}. {% elsif fpt or ghec %}{% data variables.product.company_short %} fornece executores para Ubuntu Linux, Microsoft Windows e macOS para executar seus fluxos de trabalho. Cada fluxo de trabalho é executado em uma nova máquina virtual provisionada. {% ifversion actions-hosted-runners %} {% data variables.product.prodname_dotcom %} também oferece {% data variables.actions.hosted_runner %}s, que estão disponíveis em configurações mais amplas. Para obter mais informações, consulte "[Usando {% data variables.actions.hosted_runner %}s](/actions/using-github-hosted-runners/using-larger-runners)". {% endif %}Se você precisar de um sistema operacional diferente ou precisar de uma configuração de hardware específica, você poderá hospedar seus próprios executores.{% endif %} Para mais informações{% ifversion fpt or ghec %} sobre executores auto-hospedados{% endif %}, consulte "[Hospedando os seus próprios executores](/actions/hosting-your-own-runners)"
8787

8888
{% data reusables.actions.workflow-basic-example-and-explanation %}
8989

translations/pt-BR/content/actions/using-github-hosted-runners/about-github-hosted-runners.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ Enquanto o trabalho é executado, os logs e saídas podem ser visualizados na in
9090

9191
{% note %}
9292

93-
**Note**: {% data variables.product.prodname_dotcom %} also offers {% data variables.actions.hosted_runner %}s, which are available in larger configurations. For more information, see "[Using {% data variables.actions.hosted_runner %}s](/actions/using-github-hosted-runners/using-larger-runners)."
93+
**Observação**: {% data variables.product.prodname_dotcom %} também oferece {% data variables.actions.hosted_runner %}s, que estão disponíveis em configurações maiores. Para obter mais informações, consulte "[Usando {% data variables.actions.hosted_runner %}s](/actions/using-github-hosted-runners/using-larger-runners)".
9494

9595
{% endnote %}
9696
{% endif %}

0 commit comments

Comments
 (0)